[18008] in Perl-Users-Digest
Perl-Users Digest, Issue: 168 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 29 14:07:10 2001
Date: Mon, 29 Jan 2001 11:05:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <980795116-v10-i168@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 29 Jan 2001 Volume: 10 Number: 168
Today's topics:
[Q] Character / string analysis. <apandey@u.washington.edu>
Can't use 'pop' as hash key oakbox@my-deja.com
Re: Can't use 'pop' as hash key gnari@my-deja.com
Re: copy construct reference to anonymous scalar nobull@mail.com
Re: Creating calendar (reminder) class <marc.beck@bigfoot.com>
Re: Creating calendar (reminder) class <marc.beck@bigfoot.com>
DBI problem; can't use a reference to a db handle mwarnes7676@my-deja.com
Re: Dealing with x1b character hparks@my-deja.com
Re: How to pass $vars to a script from within another s <cbah@chez.com>
Re: https problems (Jeff Haferman)
is there a limitation <dpalmeNOSPAM@unitedtraffic.com>
Re: is there a limitation <cbah@chez.com>
Making this script survive a broken TCP connection ? jfn@dassic.com
Re: More efficient than split? whubley@my-deja.com
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Newbie Question: Can I compile a Perl Script? <somewhere@planet.earth>
Re: Newbie Question: Can I compile a Perl Script? <peb@bms.umist.ac.uk>
Re: Newbie Question: Can I compile a Perl Script? <djberg96@my-deja.com>
Re: perl editors <mischief@velma.motion.net>
Re: perl editors <kdp@hom.net>
Re: Possible to UNset a Cookie? <scarroll@sci-design.com>
reading input file and returning values <rahmed@corp.phone.com>
Re: reading input file and returning values <rushbuff@netaddress.net>
Script for calculating hrs/minutes <kanayo@ub.uit.no>
Re: Script for calculating hrs/minutes (Chris Fedde)
Re: Script for calculating hrs/minutes (Nick Condon)
simple, simple question <wo_ah_ho@yahoo.com>
Re: single quotes in a system call (Helgi Briem)
Re: Spawning Parallel Processes <mischief@velma.motion.net>
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
use strict with 500 error <rushbuff@netaddress.net>
Re: use strict with 500 error <tony_curtis32@yahoo.com>
Re: use strict with 500 error <rushbuff@netaddress.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 29 Jan 2001 10:45:42 -0800
From: Anshuman Pandey <apandey@u.washington.edu>
Subject: [Q] Character / string analysis.
Message-Id: <Pine.A41.4.21.0101191655120.18502-100000@dante39.u.washington.edu>
Hello,
I would like to parse a text string and find all the possible linear
combinations of the characters in the string. Since I'm not a computer
scientist, I am ignorant of theories of performing string scansion.
To illustrate what I mean, take, for example, the string "abcd", of which
there are 8 possible linear combinations:
A+B+C+D (3 dividers)
A+B+CD (2 dividers)
A+BC+D
AB+C+D
A+BCD (1 divider)
AB+BC
ABC+D
ABCD (0 dividers)
My approach thus far is to take the string, figure out the maximum number
of divisions, and find all possible sequential permutations of the string
with the dividing characters in place; then do the same for 1 less
division, until I have zero division characters. Programmatically, I am
thinking this could be facilitated using for loops.
Ideally, the algorithm could handle an infinite string length, but for
practical purposes, I think a string length of 5 characters will be the
ceiling.
Does such an algorithm exist? Is this a classic case of CS pattern
analysis? And lastly, can what I want be achieved in Perl?
Thanks.
Regards,
Anshuman Pandey
------------------------------
Date: Mon, 29 Jan 2001 18:35:58 GMT
From: oakbox@my-deja.com
Subject: Can't use 'pop' as hash key
Message-Id: <954d6e$7gg$1@nnrp1.deja.com>
I tried to use the word 'pop' as a key in a hash, and it does not
work. Are their reserved words that cannot be hash keys?
# form input is stuck in %fields
@key_vals=(name,address,phone,pop);
foreach $key (@key_vals){
if($fields{$key} eq "1"){
#do something
}
}
Richard
richard@oakbox.com
--
"There is more to life than increasing its speed." - Mahatma Gandhi
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 29 Jan 2001 18:45:46 GMT
From: gnari@my-deja.com
Subject: Re: Can't use 'pop' as hash key
Message-Id: <954don$82j$1@nnrp1.deja.com>
In article <954d6e$7gg$1@nnrp1.deja.com>,
oakbox@my-deja.com wrote:
> I tried to use the word 'pop' as a key in a hash, and it does not
> work. Are their reserved words that cannot be hash keys?
>
no.
you can (and should) confirm this by writing a minimal script
that uses 'pop' as a key.
if that still does not work, you can post it (all of it) here,
but I think you will find that it works.
your program has a bug, that is all.
gnari
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 29 Jan 2001 18:24:30 +0000
From: nobull@mail.com
Subject: Re: copy construct reference to anonymous scalar
Message-Id: <u966iyw71d.fsf@wcl-l.bham.ac.uk>
"John Lin" <johnlin@chttl.com.tw> writes:
> my $array_hard_ref = \@array;
> my $array_copy_ref = [@array];
> my $scalar_hard_ref = \$scalar;
> my $scalar_copy_ref = ???????? # this is my question
AFAIK there is no analagous builtin short syntax for scalars in Perl
5.6. ISTR even finding this statement in one of the manuals.
> The following were my trials:
>
> my $ref = \(my $dummy = $x);
>
> It works. But better to put the $dummy in a local block.
>
> my $ref = \${\(my $dummy = $x)};
>
> Good. But how ugly. Besides, this is not anonymous.
Yes agreed, but I'd use do{} rather than ${}.
my $ref = \ do {my $dummy = $x};
Still ugly. Of course you can make a subroutine if you are prepared to
optomise for looking good over speed.
sub anon_scalar ($) {\(my $dummy = $_[0])};
my $ref = anon_scalar $x;
> my $ref = \"$x";
>
> Up to now, this is the best answer I can find, but looks weird.
It also fails if $x is itself a reference. (Or indeed a number that
must really be a number and not a string).
> What is Perl's standard way to do this?
The dummy
> Thank you.
>
> John Lin
------------------------------
Date: Mon, 29 Jan 2001 17:53:12 +0100
From: "Marc Beck" <marc.beck@bigfoot.com>
Subject: Re: Creating calendar (reminder) class
Message-Id: <95475l$fc0nm$1@ID-23826.news.dfncis.de>
> >I couldn't figure out how to manage it so the AddReminder methods
> >return immidiately but still call &alarm at the specified time.
> >Any hints for me?
>
> use Event;
>
Thx ... Event::timer should do the job. But I've got one problem with
installing these modules. make test fails with the follwing message:
t/callback..........ok 6/6FAILED test 5
Failed 1/6 tests, 83.33% okay
It'll surely work when I do a force install but I just want to know
what test 5 is and what failed. I couln't find any logs in the .cpan
directory or any other messages in my system logs.
cu Marc
------------------------------
Date: Mon, 29 Jan 2001 18:58:31 +0100
From: Marc Beck <marc.beck@bigfoot.com>
Subject: Re: Creating calendar (reminder) class
Message-Id: <dnbb7tsosl4qqbju0hbfs7jqe9nl0n73d1@4ax.com>
On Mon, 29 Jan 2001 06:26:49 GMT, garry@zvolve.com (Garry Williams)
wrote:
> use Event;
>
I said it does the job but it didn't.
What am I doing wrong?
#!/usr/bin/perl
use strict;
use Event;
my $time = time();
$time += 10;
my $reminder = Event::timer->new({ at => $time });
$reminder->cb(\&msg);
sub msg()
{
print "Hello World!";
unloop('ok');
}
------------------------------
Date: Mon, 29 Jan 2001 15:57:44 GMT
From: mwarnes7676@my-deja.com
Subject: DBI problem; can't use a reference to a db handle
Message-Id: <9543ti$u7b$1@nnrp1.deja.com>
I have a script where I connect to a database source at the top of the
script.
e.g.
my $dbh = DBI->connect("DBI:ODBC:MYSOURCE") or die "$DBI::errstr\n";
Later on in the script, I populate a variable with the source name:
e.g.
my $source = 'MYSOURCE';
Later on again, I then attempt to prepare an SQL statement (held in
$sql) using the variable to reference the data source:
e.g.
my $sth = ${$source}->prepare($sql);
This fails with the following message:
Can't call method "prepare" on an undefined value at main.pl line 116.
I'm trying to do it this way so that I can open the data connections at
the top of the program (I'm looking to create a persistent CGI script),
and use the appropriate db handle when required.
Can anyone help? Or is what I'm trying to do the wrong approach?
Cheers,
Mark
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 29 Jan 2001 16:44:13 GMT
From: hparks@my-deja.com
Subject: Re: Dealing with x1b character
Message-Id: <9546kq$q9$1@nnrp1.deja.com>
In article <3a71a102.3b2b$2b6@news.op.net>,
mjd@plover.com (Mark Jason Dominus) wrote:
> Great stars, didn't you read my message? And having asked which part
> of the manual to read, didn't you read the part I suggested that you
read?
I read your reply. I assumed that since my problem statement was
incorrect, your solution was also. I was wrong. The perlfunc
paragraph on binmode() covers this exact situation (embedded \cZ in a
text file in MS environment causing IO to stop), and binmode() solves
the problem.
Many thanks!
Howard Parks
1 Peter 4:10
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 29 Jan 2001 13:05:19 -0500
From: "Vladimir Silyaev" <cbah@chez.com>
Subject: Re: How to pass $vars to a script from within another script and e-mail results to a group.
Message-Id: <954ba7$n5r$2@nntp9.atl.mindspring.net>
"creafin1998" <creafin1998@yahoo.com> wrote in message
news:01c08943$ae02b100$48c249d8@rjuliano...
> I need to pass variables to a script from within another script, then
> e-mail the results to a group. I was hoping something like this would
> work:
>
> # $value is taken from a separate flat text file.
>
> $prog = '/path/script.pl?var=$value';
> $group = 'user1\@dot.com user2\@dot.com user3\@dot.com';
>
> `$prog | mail $group`;
>
>
> It doesn't work. It seems to tell me that it cannot find the script.
> However, when I remove the ?var=$value it at least finds the script and
> performs the e-mail function.
It'll not work, if you need to pass data between scripts the easiest may to
do it for you, will be using environment variables. See perlvar(1) for more
information. As example in your case:
$ENV{my_value}=$value;
$prog = '/path/script.pl';
$group = 'user1\@dot.com user2\@dot.com user3\@dot.com';
$prog | mail $group`;
In in '/path/scrtipt.pl':
$value=$ENV{my_value};
--
Vladimir Silyaev
Brainbench MVP for Unix Programming
http://www.brainbench.com
------------------------------
Date: 29 Jan 2001 17:46:57 GMT
From: haferman@server2.digital-web.net (Jeff Haferman)
Subject: Re: https problems
Message-Id: <slrn97bb4f.ns6.haferman@server2.digital-web.net>
When you installed openssl, Crypt::SSLeay, and LWP, how
did the supplied tests work? Were you able to get the
Crypt::SSLeay net_ssl_test to work?
Rob <rob@megagiga.com> wrote:
>I'm trying to connect to a secure server but keep getting this error..
>
>501 Protocol scheme 'https' is not supported
>
>I've installed openssl, Crypt::SSLeay and the LWP modules but no luck..
>
>Anyone know what I've missed??
>
>
>Thanks.
>
>
>
------------------------------
Date: Mon, 29 Jan 2001 10:49:48 -0600
From: "D.W." <dpalmeNOSPAM@unitedtraffic.com>
Subject: is there a limitation
Message-Id: <95475u$sth$1@slb2.atl.mindspring.net>
Is there a limitation on the amount of data that I can pass to a perl cgi in
a query string?
I have a form which is passing a lot of fields and it seems that my last
field isn't being passed at all...
Douglas
------------------------------
Date: Mon, 29 Jan 2001 12:45:17 -0500
From: "Vladimir Silyaev" <cbah@chez.com>
Subject: Re: is there a limitation
Message-Id: <954ba6$n5r$1@nntp9.atl.mindspring.net>
It has a limitations for a GET query, this limitations to all URL length and
it's depend from browser, server and everything between.
You can safely suppose that it'll handle 256 characters. If you like pass
more data you can use POST method, in such case you virtualy don't have a
limitations even if you like you can upload files in such way.
--
Vladimir Silyaev
Brainbench MVP for Perl
http://www.brainbench.com
"D.W." <dpalmeNOSPAM@unitedtraffic.com> wrote in message
news:95475u$sth$1@slb2.atl.mindspring.net...
> Is there a limitation on the amount of data that I can pass to a perl cgi
in
> a query string?
>
> I have a form which is passing a lot of fields and it seems that my last
> field isn't being passed at all...
>
> Douglas
>
>
>
------------------------------
Date: Mon, 29 Jan 2001 17:43:18 GMT
From: jfn@dassic.com
Subject: Making this script survive a broken TCP connection ?
Message-Id: <954a3j$46j$1@nnrp1.deja.com>
Hi!
The script below is supposed to take something on stdin and send it over
a TCP connection to a server script. If nothing happens on stdin for 10
seconds (alarm call), it should close any open connection.
If something related to the connection goes wrong, it should not die but
just retry next time there's stdin input.
Problem is that if it first gets a tcp connection and it later breaks,
the script dies.... so I guess something is wrong in my script.
Anyone with a hint, and/or could it be made better/smaller/more elegant
?
#!/usr/bin/perl -w
use strict;
use Socket;
use IO::Handle;
sub logmsg
{
print STDERR "$0 $$: @_ at ", scalar localtime, "\n";
};
my ($remote, $port, $iaddr, $paddr, $protocol, $socket, $connection);
# The remote host where the StatDB server script is located.
$remote = shift || 'statdb';
# The port on the remote host where the StatDB server script is
listening on.
$port = shift || 551234; # random port
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp') } logmsg "No
port." unless $port;
$iaddr = inet_aton($remote) || logmsg "Host \"$remote\" can not be
resolved";
$paddr = sockaddr_in($port, $iaddr);
$protocol = getprotobyname('tcp');
$socket = 0;
$connection = 0;
while (<>)
{
SWITCH:
{
eval
{
local $SIG{ALRM} = sub { if ($connection) {
close (SOCK) || logmsg "$!"; $connection = 0 } };
alarm 10;
if (!$connection)
{
($socket = socket(SOCK, PF_INET,
SOCK_STREAM, $protocol)) || logmsg "$!";
if ($socket)
{
($connection = connect(SOCK,
$paddr)) || logmsg "$!";
autoflush SOCK || logmsg "$!";
};
};
# If a TCP connection exist, then send what is
recieved at STDIN to the TCP socket.
if ($connection)
{
print SOCK $_ || logmsg "$!";
};
alarm 0;
};
if ($@)
{
if ($connection) { close (SOCK) || logmsg "$!"
};
$connection = 0;
};
last SWITCH;
};
};
# If the last STDIN line wasn't a proper termination line, then destroy
the TCP connection anyway.
if ($connection)
{
close (SOCK) || logmsg "$!";
};
exit;
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 29 Jan 2001 17:22:23 GMT
From: whubley@my-deja.com
Subject: Re: More efficient than split?
Message-Id: <9548s3$310$1@nnrp1.deja.com>
In article <3A71F10C.57709AC9@home.com>,
Michael Carman <mjcarman@home.com> wrote:
> whubley@my-deja.com wrote:
> >
> > mjd@plover.com (Mark Jason Dominus) wrote:
> >>
> >> What exactly is the problem here? Is your program running too
slowly?
> >> Is the problem really coming from your use of 'split'? If not, I
> >> suggest that you are worrying about performance at too low a level.
> >
> > [...]
> >
> > It's all about how fast I can turnaround a transaction.
> >
> > It sounds like your saying that if I'm looking to be more
efficient, I
> > should look elsewhere within my code? I'm not going to
> > make it up finding an alternative to split?
>
> What he was saying is that your time as a programmer is worth far more
> than the computer's time. For the vast majority of programs, trying to
> shave a few fractions of a second off of execution time by building a
> better split() is just a waste of (your employer's) money. You could
be
> writing a lot of new code instead! What you failed to mention is that
> you're working on an application for which efficiency is a serious
> issue.
>
> If speed really is that important, there are a variety of things you
can
> do: rewrite the bottlenecks in C, buy better hardware, use mod_perl if
> it's a web app., etc. If you're focused on improving your Perl code
> itself, then try to find a better algorithm. Optimizing split()
doesn't
> do that -- it's just a point solution -- which means that should be
one
> of the last things you try, if at all. A better algorithm means stuff
> like not doing anything inside a loop you can do outside of one,
getting
> rid of nested loops, or caching data instead of recalculating it.
Note:
> you may have to sacrifice memory save time.
>
> For example: I once inherited some code that had one part which took
> about two minutes to run. It was doing a brute force lookup of data
from
> one array in another one inside a nested loop, and both arrays were
> large. By first parsing one of the arrays and building a hash of the
> data I was interested in, I was able to subsequently do a simple
lookup
> as I looped over the other array. Making only one pass through each
> array cut the number of times I looped from (M * N) to (M + N). The
new
> runtime was about six seconds, most of which was spent writing files
to
> disk. That's a major improvement to the algorithm, and that's the kind
> of thing you should be looking for first.
>
> Give it a shot, and good luck.
>
> -mjc>
I did understand what he was saying. My response "It's all about how
fast I can turn around a transaction," was to properly frame the
scenario. This code will execute millions of times over many years.
This is the best use of time for this particular situation. I failed
to mention the big picture because I wanted to stay focused Anyway…
All very good points, but I think we are creeping from scope. If I
must, here is the deal... I'm writing Apache applications using
mod_perl. It really smokes! Initially I started by passing apache xml
(apache being a transaction processor), and parsing it within the mod.
Well, it took too long to chew on the xml so I switched to sending pipe
delimited strings and parsing them using split because it was faster.
Now I'm looking for ways to make that more efficient if possible
because it is a common denominator among mods.
This is just one of the ways I'm looking to optimize my mods.
I do no want to port this to C for many reasons. Beleive me, I gave
that some thought. Perhaps one day I will bring someone in who is good
with Apache mods using C for this gig and have it ported.
(interested?) ;-)
I have heard from more than my noted source that split is not efficient
(true or not, I don’t know), so I figure the Perl community would be
able to point me towards a more efficient method. However, it sounds
like split is, indeed, my best option. (Sending pipe-delimited strings
is easy for the clients to handle as well. Real simple. Easy
interface spec.)
It seems that I should give up on optimizing this portion of code and
move on to other potential bottlenecks.
I believe Perl is the correct tool for this job, but I could be wrong.
Thank you all for your very well though out responses.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 29 Jan 2001 16:41:07 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <t7b7938skl2q6c@corp.supernews.com>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 22 Jan 2001 16:38:09 GMT and ending at
29 Jan 2001 14:03:09 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2001 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 169 (38.9% of all posters)
Articles: 297 (22.6% of all articles)
Volume generated: 475.7 kb (20.4% of total volume)
- headers: 225.9 kb (4,602 lines)
- bodies: 247.0 kb (8,845 lines)
- original: 181.1 kb (6,887 lines)
- signatures: 2.4 kb (61 lines)
Original Content Rating: 0.733
Averages
========
Posts per poster: 1.8
median: 1 post
mode: 1 post - 119 posters
s: 2.0 posts
Message size: 1640.0 bytes
- header: 779.0 bytes (15.5 lines)
- body: 851.8 bytes (29.8 lines)
- original: 624.2 bytes (23.2 lines)
- signature: 8.3 bytes (0.2 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
12 14.8 ( 9.0/ 5.0/ 3.6) Tore Aursand <tore@extend.no>
9 13.0 ( 7.9/ 5.1/ 3.3) "Marc Beck" <marc.beck@bigfoot.com>
9 9.6 ( 6.4/ 3.2/ 3.2) "creafin1998" <creafin1998@yahoo.com>
8 10.2 ( 5.6/ 4.6/ 2.4) Mario <m_ario@my-deja.com>
8 7.2 ( 6.0/ 1.2/ 1.2) hanja <hanja@my-deja.com>
7 9.7 ( 5.0/ 4.7/ 1.9) "Dan" <kkk@elrancho.com>
7 18.9 ( 6.8/ 12.1/ 11.0) "Brent Dax" <brentdax1_@_earthlink.net>
6 7.1 ( 3.9/ 3.2/ 3.0) "Richard Muller" (at) (dot) (deletethis) <rlmullermsn..com>
6 13.4 ( 7.0/ 6.4/ 2.3) "Koen Bossaert" <not@defined.com>
5 8.4 ( 3.8/ 4.6/ 2.3) bits101010@my-deja.com
These posters accounted for 5.9% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
18.9 ( 6.8/ 12.1/ 11.0) 7 "Brent Dax" <brentdax1_@_earthlink.net>
14.8 ( 9.0/ 5.0/ 3.6) 12 Tore Aursand <tore@extend.no>
13.5 ( 2.9/ 10.7/ 8.4) 4 nexus6_kills@yahoo.com
13.4 ( 7.0/ 6.4/ 2.3) 6 "Koen Bossaert" <not@defined.com>
13.0 ( 7.9/ 5.1/ 3.3) 9 "Marc Beck" <marc.beck@bigfoot.com>
10.2 ( 5.6/ 4.6/ 2.4) 8 Mario <m_ario@my-deja.com>
9.7 ( 5.0/ 4.7/ 1.9) 7 "Dan" <kkk@elrancho.com>
9.7 ( 3.5/ 6.2/ 4.1) 5 jqcordova@my-deja.com
9.6 ( 6.4/ 3.2/ 3.2) 9 "creafin1998" <creafin1998@yahoo.com>
9.1 ( 3.4/ 5.7/ 3.2) 4 pking123@sympatico.ca
These posters accounted for 5.2% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 1.2 / 1.2) 8 hanja <hanja@my-deja.com>
1.000 ( 1.9 / 1.9) 4 sjamiso@my-deja.com
1.000 ( 3.2 / 3.2) 9 "creafin1998" <creafin1998@yahoo.com>
0.940 ( 3.0 / 3.2) 6 "Richard Muller" (at) (dot) (deletethis) <rlmullermsn..com>
0.912 ( 11.0 / 12.1) 7 "Brent Dax" <brentdax1_@_earthlink.net>
0.851 ( 2.0 / 2.4) 3 hparks@my-deja.com
0.788 ( 8.4 / 10.7) 4 nexus6_kills@yahoo.com
0.721 ( 2.7 / 3.8) 4 "Roman Moeller" <roman@topologix.de>
0.715 ( 0.8 / 1.1) 3 "Andy Geraerts" <angeraer@hotmail.com>
0.704 ( 3.6 / 5.0) 12 Tore Aursand <tore@extend.no>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.578 ( 1.6 / 2.7) 3 "Robin Corcoran" <robinc@LMGroup.com>
0.560 ( 3.2 / 5.7) 4 pking123@sympatico.ca
0.515 ( 2.4 / 4.6) 8 Mario <m_ario@my-deja.com>
0.511 ( 2.3 / 4.6) 5 bits101010@my-deja.com
0.473 ( 1.3 / 2.8) 3 knb50@my-deja.com
0.431 ( 1.1 / 2.5) 4 Mona Wuerz <wuerz@yahoo.com>
0.403 ( 1.9 / 4.7) 7 "Dan" <kkk@elrancho.com>
0.403 ( 1.5 / 3.6) 3 Tom <xxxtmanningxxx@canada.com>
0.365 ( 1.1 / 2.9) 3 "Dustin" <dfreeman@rathis.com>
0.354 ( 2.3 / 6.4) 6 "Koen Bossaert" <not@defined.com>
24 posters (14%) had at least three posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
25 alt.perl
22 comp.lang.perl.modules
12 comp.unix.questions
11 comp.unix.shell
7 comp.unix.admin
7 comp.lang.perl
7 comp.lang.awk
5 pl.comp.lang.perl
3 comp.lang.perl.moderated
2 de.comp.lang.perl.misc
Top 10 Crossposters
===================
Articles Address
-------- -------
9 marketing@usenix.org
4 pking123@sympatico.ca
4 peter@icke-reklam.ipsec.nu.invalid
4 Robert Katz <katz@alf.dec.com>
4 Derek M. Flynn <dmf@cs.uchicago.edu>
3 "junior" <junior_s@sympatico.ca>
2 Michael Stoic <stoic@speakeasy.org>
2 "Gio Ahmad" <gioahmad@bellatlantic.net>
2 Steve50@zxmail.com
2 bits101010@my-deja.com
------------------------------
Date: Mon, 29 Jan 2001 17:07:25 +0100
From: "Dimitri Gunsing" <somewhere@planet.earth>
Subject: Re: Newbie Question: Can I compile a Perl Script?
Message-Id: <9544fc$4gt$1@list.pbnec.nl>
On Windows you can use perl2exe from activestate.com. It's not free though.
James And Tess Hawks <jhawks@yta.attmil.ne.jp> wrote in message
news:953mfj$95p$1@newsflood.tokyo.att.ne.jp...
> Is it possible to compile a Perl script so I can use it on computers
without
> Perl installed?
>
>
------------------------------
Date: Mon, 29 Jan 2001 16:43:08 +0000
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Newbie Question: Can I compile a Perl Script?
Message-Id: <3A759D9C.DA8EE101@bms.umist.ac.uk>
> 2) Because it's not searchable (although I did find a searchable Perl/Tk archive -
> if there's one for perl, someone please let me know).
> I don't feel like reading through the TOC for every FAQ until I happen to come
> across the topic I'm looking for.
you can use the perldoc program to search the FAQ.
perldoc -q 'keywords'
> So, the answer is, "Yeah, yeah, yeah, I read the FFAQ and got JS out of it, so
> just answer my FQ".
ouch!
Paul
------------------------------
Date: Mon, 29 Jan 2001 17:05:28 GMT
From: Daniel Berger <djberg96@my-deja.com>
Subject: Re: Newbie Question: Can I compile a Perl Script?
Message-Id: <9547sg$27t$1@nnrp1.deja.com>
<eating crow - munch, chomp, blech> - Thanks for the info, though it
took me a while to find it (I ended up doing a "find" through the
entire directory structure). Not sure why it's in a non-standard
location. Yet another PATH entry...
However, before I totally choke on crow, see the caveat about perldoc
in "Effective Perl Programming", p.175. Some programmers might not
have access to perldoc.
Thanks.
Dan
In article <3A759D9C.DA8EE101@bms.umist.ac.uk>,
Paul Boardman <peb@bms.umist.ac.uk> wrote:
>
> > 2) Because it's not searchable (although I did find a searchable
Perl/Tk archive -
> > if there's one for perl, someone please let me know).
> > I don't feel like reading through the TOC for every FAQ until I
happen to come
> > across the topic I'm looking for.
>
> you can use the perldoc program to search the FAQ.
>
> perldoc -q 'keywords'
>
> > So, the answer is, "Yeah, yeah, yeah, I read the FFAQ and got JS
out of it, so
> > just answer my FQ".
>
> ouch!
>
> Paul
>
--
In the immortal words of Socrates, "I drank what?"
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 29 Jan 2001 17:17:40 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: perl editors
Message-Id: <t7b9dkqh46b3c1@corp.supernews.com>
hanja <hanja@my-deja.com> wrote:
> Out of curiousity, what editor do you use to write your scripts?
vim
... and if i have to do something for Windows that's nontrivial
and therefore notepad is unfit, I edit in vim then ftp the program
over. ;)
Chris
--
Christopher E. Stith
If they can get you asking the wrong questions, they don't
have to worry about the answers.
-- Thomas Pynchon, Gravity's Rainbow
------------------------------
Date: Mon, 29 Jan 2001 12:49:28 -0500
From: Keith Phillips <kdp@hom.net>
Subject: Re: perl editors
Message-Id: <3A75AD28.C2DCC062@hom.net>
>> hanja <hanja@my-deja.com> wrote:
>> Out of curiousity, what editor do you use to write your scripts?
> vim
> ... and if i have to do something for Windows that's nontrivial
> and therefore notepad is unfit, I edit in vim then ftp the program
> over. ;)
Uhmmm...why not install/use vim for Win95/98/NT? Then you
can have your code and edit it, too...
Keith Phillips
kdp@hom.net
------------------------------
Date: Mon, 29 Jan 2001 18:30:10 -0000
From: Stuart Carroll <scarroll@sci-design.com>
Subject: Re: Possible to UNset a Cookie?
Message-Id: <t7bdlilh3ebr21@corp.supernews.com>
Mark,
But if I set the expire to -1day, won't the browser forget it immediately?
I need to be able to access it for the duration of the session.
Stuart
>>I've figured out how to set a cookie, and retreive it - but is it
>> possible to UNset the cookie?
>
> Yes. When you sent a cookie, you may specify an expire time. If the
> expire time is in the past, the browser is supposed to forget the
> cookie.
>
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
Date: Mon, 29 Jan 2001 09:18:22 -0800
From: "Razi Ahmed" <rahmed@corp.phone.com>
Subject: reading input file and returning values
Message-Id: <9548jf$hvg$1@news.phone.com>
hell all
I have a file (config) like this
mta= s1,s2,s3;
to =you@s1.com
from=me@s2.com
subject= hello
i want to read this file and parse it and return the values..
i opened a filehandle
sub config(){
open(config, "/xy/z/cfg.text")
while<config>{
chomp; # no newline
s/#.*//; # no comments
s/^\s+//; # no leading white
s/\s+$//; # no trailing white
next unless length; # anything left?
#my ($var, $value) = split(/\s*=\s*/, $_, 2);
my ($var, $value) = split(/\s*=\s*/, $_, 2);
$User_Preferences{$var} = $value;
}
Now I am wanna return the four values from config module..
need some help..
thanks
}
------------------------------
Date: Mon, 29 Jan 2001 11:23:55 -0600
From: "Don Bremer" <rushbuff@netaddress.net>
Subject: Re: reading input file and returning values
Message-Id: <vIhd6.6126$Uo2.20408@newsfeed.slurp.net>
They're global - you didn't use my to narrow the scope. Just request
them...
Say one of your $vars is foo and the value is bar:
print $User_Preferences{'foo'};
Will get you:
bar.
Razi Ahmed wrote in message <9548jf$hvg$1@news.phone.com>...
>hell all
>
>I have a file (config) like this
>mta= s1,s2,s3;
>to =you@s1.com
>from=me@s2.com
>subject= hello
>
>
>i want to read this file and parse it and return the values..
>i opened a filehandle
>sub config(){
>open(config, "/xy/z/cfg.text")
>while<config>{
>
>chomp; # no newline
> s/#.*//; # no comments
> s/^\s+//; # no leading white
> s/\s+$//; # no trailing white
> next unless length; # anything left?
> #my ($var, $value) = split(/\s*=\s*/, $_, 2);
> my ($var, $value) = split(/\s*=\s*/, $_, 2);
> $User_Preferences{$var} = $value;
>}
>Now I am wanna return the four values from config module..
>need some help..
>thanks
>
>
>
>}
>
>
>
>
------------------------------
Date: Mon, 29 Jan 2001 17:13:03 +0100
From: Kanayo <kanayo@ub.uit.no>
Subject: Script for calculating hrs/minutes
Message-Id: <3A75968F.205596A2@ub.uit.no>
I am new in the world of perl. Has anyone out there written a perl
script that will do hour/minute calculation. For example
08.05 - 14.15 = 6.0 hrs 10mins.
10.25 - 16.30 = 6.0 hrs 5mins
Total = 12 hrs 15 mins
Thanks in advance.
Kanayo
------------------------------
Date: Mon, 29 Jan 2001 16:57:09 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Script for calculating hrs/minutes
Message-Id: <Fhhd6.1430$B9.192880640@news.frii.net>
In article <3A75968F.205596A2@ub.uit.no>, Kanayo <kanayo@ub.uit.no> wrote:
>I am new in the world of perl. Has anyone out there written a perl
>script that will do hour/minute calculation. For example
>
>08.05 - 14.15 = 6.0 hrs 10mins.
>10.25 - 16.30 = 6.0 hrs 5mins
> Total = 12 hrs 15 mins
>
There are numerous date and time calculation modules available on CPAN.
DateCalc contains many functions that might bve useful for your needs.
chris
--
This space intentionally left blank
------------------------------
Date: 29 Jan 2001 17:07:38 GMT
From: nickco3@yahoo.co.uk (Nick Condon)
Subject: Re: Script for calculating hrs/minutes
Message-Id: <9038A09A5NickCondon@132.146.16.23>
kanayo@ub.uit.no (Kanayo) wrote in <3A75968F.205596A2@ub.uit.no>:
>I am new in the world of perl. Has anyone out there written a perl
>script that will do hour/minute calculation. For example
>
>08.05 - 14.15 = 6.0 hrs 10mins.
>10.25 - 16.30 = 6.0 hrs 5mins
> Total = 12 hrs 15 mins
Yeah, have a look on CPAN for Date::Calc.
------------------------------
Date: Mon, 29 Jan 2001 13:12:45 -0500
From: "Jason Wong" <wo_ah_ho@yahoo.com>
Subject: simple, simple question
Message-Id: <954bpj$i3q$1@bcrkh13.ca.nortel.com>
How to load a website in cgi script
Jason
------------------------------
Date: Mon, 29 Jan 2001 17:26:37 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: single quotes in a system call
Message-Id: <3a75a67f.637505374@news.itn.is>
On Mon, 29 Jan 2001 08:14:30 GMT, jdallega@my-deja.com
wrote:
>Can somebody please help?
>
>I'm trying to use the system call, but it fails when I have single
>quotes in it e.g.
>
> system('find . -name 'foo*' -mtime -1 -print');
I guess you have to escape the single quotes, i.e.
system('find . -name \'foo*\' -mtime -1 -print');
if for some strange reason you actually want to
do this. Why not use the File::Find module instead
and avoid a completely unneccessary system call.
>The following also failed on a particular directory I was trying to
>read:-
>
> foreach $file (<*>)
This works for me:
foreach $file (<*>) { print "$file\n"; }
Is your perl broken?
>And glob doesnt work either - in fact both glob and foreach, return the
>same error :- "blah ... there was an internal error while using glob
>blah ... CHUNK blah ..."
>
This works for me:
'my @files = glob("*.pl"); for (@files) { print "$_\n"; }'
foreach $file (<*>) { print "$file\n"; }
Is your perl broken?
Regards,
Helgi Briem
------------------------------
Date: Mon, 29 Jan 2001 18:25:15 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Spawning Parallel Processes
Message-Id: <t7bdcbckdldt89@corp.supernews.com>
[below paragraph has re-adjusted line lengths, as it wrapped
strangely and looked ugly in my newsreader]
arkconfused@hotmail.com wrote:
> In article <JTja6.16602$Kl5.2085640@typhoon.southeast.rr.com>,
> "David Sisk" <davesisk@ipass.net> wrote:
>> Hi:
>>
>> I know your pain. I couldn't find a good example of this
>> anywhere (or at least not one I understood) Search this
>> newsgroup for a posting called "fork lots of children". A
>> fellow posted an example a couple of days ago that shows
>> exactly how to do what you want. It doesn't use signals,
>> which (to my understanding) is a good thing.
Refraining from using signals can be a good thing sometimes,
like if you're working on a system where signals are less
reliable than the norm or when you're really paranoid about
missing them. Like most things, though, a phobic tendency
away from using them can be harmful. Moderation is a somewhat
good idea most of the time ;)
I do avoid singals sometimes, but I just as often if not more
often go ahead and use their functionality and convenience when
they can be helpful. I'm not saying this to be contrary to the
post to which I'm responding or to the person who posted the
examples which didn't use signals. I'm just trying to give some
context to the statements I quote. As a matter of fact, the
examples mentioned could be those that I posted to the mentioned
thread, which do work and are pretty easy to understand but by
no means are the most accepted examples for how to fork children.
The Ram is a good place to look.
[snipped Jeopardy-quoted text]
Chris
--
Christopher E. Stith
Disclaimer: Actual product may not resemble picture in ad in any way.
------------------------------
Date: Mon, 29 Jan 2001 16:40:44 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <t7b78ccbu25e5b@corp.supernews.com>
Following is a summary of articles spanning a 7 day period,
beginning at 22 Jan 2001 16:38:09 GMT and ending at
29 Jan 2001 14:03:09 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2001 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Excluded Posters
================
perlfaq-suggestions\@(?:.*\.)?perl\.com
Totals
======
Posters: 435
Articles: 1315 (508 with cutlined signatures)
Threads: 378
Volume generated: 2333.8 kb
- headers: 1052.2 kb (20,897 lines)
- bodies: 1215.3 kb (40,173 lines)
- original: 833.1 kb (29,440 lines)
- signatures: 65.1 kb (1,464 lines)
Original Content Rating: 0.686
Averages
========
Posts per poster: 3.0
median: 1 post
mode: 1 post - 237 posters
s: 5.2 posts
Posts per thread: 3.5
median: 2.0 posts
mode: 1 post - 107 threads
s: 3.6 posts
Message size: 1817.4 bytes
- header: 819.3 bytes (15.9 lines)
- body: 946.4 bytes (30.5 lines)
- original: 648.8 bytes (22.4 lines)
- signature: 50.7 bytes (1.1 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
41 60.9 ( 35.4/ 22.3/ 15.1) jdf@pobox.com
34 94.2 ( 30.1/ 57.4/ 37.0) mgjv@tradingpost.com.au
32 68.3 ( 31.5/ 27.0/ 21.2) Mark Jason Dominus <mjd@plover.com>
30 58.5 ( 28.2/ 24.7/ 23.1) abigail@foad.org
28 114.1 ( 20.7/ 92.3/ 92.3) PerlFAQ Server <faq@denver.pm.org>
25 39.9 ( 17.5/ 22.0/ 11.1) Garry Williams <garry@zvolve.com>
24 54.4 ( 20.2/ 33.7/ 26.3) "Godzilla!" <godzilla@stomp.stomp.tokyo>
23 28.9 ( 18.5/ 9.3/ 4.5) brian d foy <comdog@panix.com>
21 43.6 ( 19.0/ 18.4/ 7.2) Uri Guttman <uri@sysarch.com>
21 28.9 ( 17.4/ 11.3/ 6.9) Bart Lateur <bart.lateur@skynet.be>
These posters accounted for 21.2% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
114.1 ( 20.7/ 92.3/ 92.3) 28 PerlFAQ Server <faq@denver.pm.org>
94.2 ( 30.1/ 57.4/ 37.0) 34 mgjv@tradingpost.com.au
68.3 ( 31.5/ 27.0/ 21.2) 32 Mark Jason Dominus <mjd@plover.com>
60.9 ( 35.4/ 22.3/ 15.1) 41 jdf@pobox.com
58.5 ( 28.2/ 24.7/ 23.1) 30 abigail@foad.org
54.4 ( 20.2/ 33.7/ 26.3) 24 "Godzilla!" <godzilla@stomp.stomp.tokyo>
43.6 ( 19.0/ 18.4/ 7.2) 21 Uri Guttman <uri@sysarch.com>
39.9 ( 17.5/ 22.0/ 11.1) 25 Garry Williams <garry@zvolve.com>
32.1 ( 12.9/ 19.1/ 10.9) 17 Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
29.1 ( 14.2/ 13.0/ 8.5) 14 tadmc@augustmail.com
These posters accounted for 25.5% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 3.2 / 3.2) 9 "creafin1998" <creafin1998@yahoo.com>
1.000 ( 92.3 / 92.3) 28 PerlFAQ Server <faq@denver.pm.org>
1.000 ( 1.2 / 1.2) 8 hanja <hanja@my-deja.com>
0.999 ( 8.4 / 8.4) 8 Rob <a565a87@my-deja.com>
0.952 ( 8.6 / 9.1) 12 The WebDragon <nospam@nospam.com>
0.940 ( 3.0 / 3.2) 6 "Richard Muller" (at) (dot) (deletethis) <rlmullermsn..com>
0.935 ( 23.1 / 24.7) 30 abigail@foad.org
0.912 ( 11.0 / 12.1) 7 "Brent Dax" <brentdax1_@_earthlink.net>
0.888 ( 19.8 / 22.2) 9 Greg Bacon <gbacon@cs.uah.edu>
0.835 ( 3.0 / 3.6) 5 "Géry" <ducateg@info.bt.co.uk>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.495 ( 4.9 / 9.9) 13 bernard.el-hagin@lido-tech.net
0.488 ( 4.5 / 9.3) 23 brian d foy <comdog@panix.com>
0.480 ( 4.2 / 8.7) 11 Damian James <damian@qimr.edu.au>
0.480 ( 1.6 / 3.4) 5 jtjohnston <jtjohnston@courrier.usherb.ca>
0.477 ( 5.7 / 11.9) 11 tigra@sky.deep.ru
0.403 ( 1.9 / 4.7) 7 "Dan" <kkk@elrancho.com>
0.392 ( 7.2 / 18.4) 21 Uri Guttman <uri@sysarch.com>
0.376 ( 1.6 / 4.2) 6 Jim Monty <monty@primenet.com>
0.354 ( 2.3 / 6.4) 6 "Koen Bossaert" <not@defined.com>
0.303 ( 1.2 / 4.1) 5 "Sean Meisner" <sdmeisner@SPAMGUARDyahoo.com>
62 posters (14%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
28 perl editors
28 Comparing multiple values
22 Perl is bad at (very) simple math!
22 Directory Recursion Problem.
19 Calling rsync with "system" does not work
19 s/// inconsistency
17 Script to "rotate" the chars in a string.
14 Catching warnings from Getopt::Std
12 stability of threads + interpreter performance
12 String comparing?
These threads accounted for 14.7% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
46.6 ( 18.3/ 26.2/ 15.9) 19 Calling rsync with "system" does not work
44.5 ( 22.1/ 20.3/ 11.8) 22 Directory Recursion Problem.
43.9 ( 23.5/ 17.1/ 10.4) 28 Comparing multiple values
35.1 ( 16.5/ 17.1/ 11.0) 22 Perl is bad at (very) simple math!
33.5 ( 15.3/ 17.3/ 9.6) 19 s/// inconsistency
31.9 ( 20.9/ 9.2/ 6.2) 28 perl editors
27.9 ( 8.9/ 18.2/ 10.4) 11 Upgrading to Perl 5.6 under Debian 2.2
27.5 ( 13.9/ 12.1/ 8.4) 17 Script to "rotate" the chars in a string.
25.7 ( 9.1/ 16.6/ 10.9) 10 Benchmark: Test Code Syntax Error
25.2 ( 11.5/ 12.8/ 6.7) 14 Catching warnings from Getopt::Std
These threads accounted for 14.6% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.935 ( 3.4/ 3.6) 6 How to send output to a file instead of stdout
0.935 ( 4.4/ 4.7) 6 FreezeThaw.
0.927 ( 4.5/ 4.8) 5 help! Capturing matched content in regex (with double-byte chars)
0.831 ( 5.2/ 6.3) 8 Non Unix user needs help with File::Find
0.805 ( 2.8/ 3.5) 6 unexplained warning ?
0.792 ( 3.4/ 4.3) 5 html link on perl created dynamic webpage
0.785 ( 5.1/ 6.5) 8 How valid is $ {$foo} ?
0.776 ( 9.6/ 12.4) 6 Q: socket communication between perl and java
0.760 ( 2.3/ 3.1) 6 Get/install ReadKey.pm from CPAN -- HowTo?
0.754 ( 2.2/ 2.9) 7 How to pass $vars to a script from within another script and e-mail results to a group.
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.503 ( 2.4 / 4.8) 6 Form Processing - newbie question
0.492 ( 3.8 / 7.7) 12 Text:CSV can't handle german characters
0.486 ( 1.4 / 2.8) 8 partition a large file into a number of small ones
0.472 ( 1.0 / 2.2) 5 [OT] Italic fonts too big
0.465 ( 2.8 / 6.0) 8 Split string into two arrays
0.461 ( 3.5 / 7.5) 5 Syntax Trouble
0.458 ( 1.6 / 3.5) 6 Perl Style Guide - uncuddled elses
0.422 ( 5.0 / 11.8) 12 stability of threads + interpreter performance
0.422 ( 3.4 / 8.0) 7 FileHandle Question?
0.422 ( 2.1 / 5.0) 6 Trouble sorting array
84 threads (22%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
25 alt.perl
22 comp.lang.perl.modules
12 comp.unix.questions
11 comp.unix.shell
7 comp.unix.admin
7 comp.lang.perl
7 comp.lang.awk
5 pl.comp.lang.perl
3 comp.lang.perl.moderated
2 de.comp.lang.perl.misc
Top 10 Crossposters
===================
Articles Address
-------- -------
9 marketing@usenix.org
5 jtjohnston <jtjohnston@courrier.usherb.ca>
5 Garry Williams <garry@zvolve.com>
4 "Peter Sundstrom" <peter.sundstrom@eds.com>
4 peter@icke-reklam.ipsec.nu.invalid
4 Jim Monty <monty@primenet.com>
4 Robert Katz <katz@alf.dec.com>
4 "PaAnWa" <paul_wasilkoff@ucg.org>
4 Derek M. Flynn <dmf@cs.uchicago.edu>
4 "paanwa" <paanwa@hotmail.com>
------------------------------
Date: Mon, 29 Jan 2001 11:13:19 -0600
From: "Don Bremer" <rushbuff@netaddress.net>
Subject: use strict with 500 error
Message-Id: <uyhd6.6121$Uo2.20104@newsfeed.slurp.net>
I've just been asked to use "use strict" in some of my scripts and I'm
getting a 500 error *whenever* I use it. Below is a code that I've used
simply to test the use strict flag:
>>>
#!/usr/local/bin/perl
use strict;
print "Content-type: text/html\n\n";
print "hello world\n";
<<<
It runs from the command line (just helloworld) without warnings and when I
say :
perl -Tw helloworld
from the command line. If I remove "use strict", it works like a charm.
Can you not use the 'use strict' tag with some web servers? Am I just going
crazy?
Technical specs:
NCSA HTTPd Server 1.5.2
Perl 5.006
Thanks in advance. You may reply to the group or to
dbremer-at-ecodev-dot-com. Do not use the reply address given.
Don Bremer
------------------------------
Date: 29 Jan 2001 11:30:03 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: use strict with 500 error
Message-Id: <878znunu5g.fsf@limey.hpcc.uh.edu>
>> On Mon, 29 Jan 2001 11:13:19 -0600,
>> "Don Bremer" <rushbuff@netaddress.net> said:
> I've just been asked to use "use strict" in some of my
> scripts and I'm getting a 500 error *whenever* I use it.
Perl does not have a "500 error". That is coming from the
Web server. I'm sure you realise that, but it needs to be
pointed out.
> #!/usr/local/bin/perl
> use strict;
> print "Content-type: text/html\n\n";
> print "hello world\n";
> Can you not use the 'use strict' tag with some web
> servers? Am I just going crazy?
I think that you're not using /usr/local/bin/perl from the
command-line, but something else. /usr/local/bin/perl
might possibly be perl4. You can test this with
(a) from the command-line, do "which perl" and see if it
really is /usr/local/bin/perl.
(b) make the CGI program print out the perl version:
print "hello world from perl $]\n"; (perldoc perlvar)
Apart from that, the only other immediate possibility is a
screwed-up perl5 install.
(Also note you should start thinking about the CGI.pm
module ASAP.
#!/usr/local/bin/perl -w
use strict;
use CGI qw(:standard);
print header;
print start_html;
print "hello world\n";
print end_html;
)
hth
t
--
Eih bennek, eih blavek.
------------------------------
Date: Mon, 29 Jan 2001 12:14:24 -0600
From: "Don Bremer" <rushbuff@netaddress.net>
Subject: Re: use strict with 500 error
Message-Id: <Krid6.6158$Uo2.20529@newsfeed.slurp.net>
Thanks for the speedy response!
I have done the version check (it is 5.006) and checked the path, and
everything is correct.
But! I moved it over to an "unsecured" server and did not have a problem
when running it from the web. Therefore, I think -use strict- uses a path
that cannot be accessed by user nobody. I've read the Changes text that
came with Perl and it didn't point anything out special with permissions and
use strict.
I've written gobs of PERL stuff before with no problems with permissions.
When I run the Perl script using the command line, I also have no problems.
These 4 lines won't work using -use strict-, therefore I think it's a
problem with that.
Do you know of any special paths that -use strict- uses? Do you know where
I can find the real dirt on -use strict-?
Thanks!
Don Bremer
>> #!/usr/local/bin/perl
>> use strict;
>> print "Content-type: text/html\n\n";
>> print "hello world\n";
>
>> Can you not use the 'use strict' tag with some web
>> servers? Am I just going crazy?
>
>I think that you're not using /usr/local/bin/perl from the
>command-line, but something else. /usr/local/bin/perl
>might possibly be perl4. You can test this with
>
>(a) from the command-line, do "which perl" and see if it
>really is /usr/local/bin/perl.
>
>(b) make the CGI program print out the perl version:
>
> print "hello world from perl $]\n"; (perldoc perlvar)
>
>Apart from that, the only other immediate possibility is a
>screwed-up perl5 install.
>
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 168
**************************************