[17955] in Perl-Users-Digest
Perl-Users Digest, Issue: 115 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 22 06:05:24 2001
Date: Mon, 22 Jan 2001 03:05:07 -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: <980161506-v10-i115@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 22 Jan 2001 Volume: 10 Number: 115
Today's topics:
Re: A hash of arrays (HELP) (Eric Bohlman)
Re: Anyone with MLDBM experience out there? (Chris Fedde)
Re: Anyone with MLDBM experience out there? <robert@chalmers.com.au>
Re: Assistance in Oz <wyzelli@yahoo.com>
Re: Assistance in Oz <robert@chalmers.com.au>
Re: Counting elements in an array (foreach) <me@jp1.co.uk>
Re: Counting elements in an array (foreach) (Bernard El-Hagin)
ERROR: Bad arg length for Socket jce2000@my-deja.com
help with this please <druid@nift.net>
Re: help with this please (David Efflandt)
Re: How do I read back saved-form data? (Perl Cookbook, (David Efflandt)
Re: HTML::Form Examples david5517@my-deja.com
Re: input_record_separator error (Anno Siegel)
Re: interesting regex? amit_mathur@my-deja.com
Re: Internal Server Error- Newbie Question. <someguyREMOVE@REMOVEsunflower.com>
Re: Newbie: Anyone heard of Mail::Sender? <someguyREMOVE@REMOVEsunflower.com>
Re: percentages, how? <Michael.Schlueter@philips.com>
Re: Posting Guidelines (was Re: Perl - Bytecode, Compil <comdog@panix.com>
Re: Quick Newbie Qeustion please... <joe+usenet@sunstarsys.com>
Re: Quick Newbie Qeustion please... (Eric Bohlman)
Re: Quick Newbie Qeustion please... (Eric Bohlman)
Re: Quick Newbie Qeustion please... <joe+usenet@sunstarsys.com>
Re: warning! moronzilla is back (Abigail)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Jan 2001 06:26:07 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: A hash of arrays (HELP)
Message-Id: <94gjpv$rtd$2@bob.news.rcn.net>
Michael Benson <mbenson@mediaone.net> wrote:
> The problem actually comes when i try to store the hash to a database and
> then open it. I apologize for the confusion. The below code doesn't print
> $hash{abc}[1]
perldoc -q multidimensional
------------------------------
Date: Mon, 22 Jan 2001 05:09:27 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Anyone with MLDBM experience out there?
Message-Id: <bgPa6.1183$B9.193613824@news.frii.net>
In article <LYMa6.42$m51.11529@nsw.nnrp.telstra.net>,
Merlin <robert@chalmers.com.au> wrote:
>Hi,
>
>I have a small program - straight out of The Perl Cookbook basically - that
>uses MLDBM for the persistent storage of data. (Page 506, 14.9)
>Now, the program works fine as a standalone, but when I put it into a larger
>program - it appears to work - no errors - creates the persistent store -
>just doesn't store anything in it!
>
>Now this is the same program almost that works fine as a standalone...
>
>I think some other module must be interfering iwth it, but can't see what it
>could be.
>
Since you post no code it's hard to make guesses. But I'll charge ahead
like the fool I am and make a few anyway. I've run into numerous problems
with code that "use POSIX". Not that POSIX is a problem but that it is huge
and stuffs lots of subroutines into the namespace. Most of the time it is
best to only import what you need from POSIX or any other large module.
I've also seen problems using tie when the code does not call untie. You
might want to prove that it is being untied. It is also posible for your
code to be making a copy of the tied hash and doing inserts to that rather
than to the has itself.
Obviously you need to follow all the conventons. Your code should
"use warnings" and "use strict". You should read the perlmod and
perlmodlib manual pages. You should make and use automated test
suites.
--
This space intentionally left blank
------------------------------
Date: Mon, 22 Jan 2001 15:40:50 +1000
From: "Merlin" <robert@chalmers.com.au>
Subject: Re: Anyone with MLDBM experience out there?
Message-Id: <6PPa6.59$m51.16322@nsw.nnrp.telstra.net>
>
> Since you post no code it's hard to make guesses. But I'll charge ahead
> like the fool I am and make a few anyway. I've run into numerous
problems
No, please. I realy appreciate any answers. Thanks.
I'll try and be a bit more specific, but I hate to clutter up the space with
code....
> I've also seen problems using tie when the code does not call untie. You
> might want to prove that it is being untied. It is also posible for your
> code to be making a copy of the tied hash and doing inserts to that rather
> than to the has itself.
it is being untied, and all that. ARRR Ha! that bit about the hash rings a
chime...
========================================
my (%data, $VARIABLE1, $VARIABLE2);
my $Persistent_Store;
$Persistent_Store = "/tmp/$HTML{referenceID}";
tie(%data, 'MLDBM', $Persistent_Store) or die "Can't tie to
$Persistent_Store : $!";
$cardType = $HTML{cardType};
#.....
untie %data;
tie (%data, 'MLDBM', $Persistent_Store) or die "Can't tie to
$Persistent_Store : $!";
$data{cardType} = $HTML{cardType};
#......
print "DATA: $data{cardType}\n";
untie %data;
===========================================
jeeeezzzz - sometimes I'm as thick as two short planks. Using both together
to test... wrong way round Bob!!! - the second one I just discover actually
DOES store the data where I want it.
so with a bit of changing about.... we now have "Wax on, wax off"...
............................................................................
.................
$Persistent_Store = "/tmp/$HTML{referenceID}";
tie (%data, 'MLDBM', $Persistent_Store) or die "Can't tie to
$Persistent_Store : $!";
$data{cardType} = $HTML{cardType};
#......
print "DATA In: $data{cardType}\n";
untie %data;
tie(%data, 'MLDBM', $Persistent_Store) or die "Can't tie to
$Persistent_Store : $!";
$HTML{cardType} = $data{cardType};
#.....
print "DATA out: $HTML{cardType}\n";
untie %data;
............................................................................
.................
>
> Obviously you need to follow all the conventons. Your code should
and it proves again that in a lot of cases, even a casual comment from
another programmer is enough to trip the blockage. This working at home is
the pits at times. So thanks Chris. I really do appreciate the time you took
to answer. (Instead of simply abusing another stuck-in-a-rut programmer
) )
I've spent days on this - even started looking at other options to keep
persistent code across calls. There is another, but not half so elegant as
this, and I have to admit that this one got under my skin. I was going to
solve it as ALL costs.. I hope I can now get it completly working...
cheers, and thanks
Robert
> --
> This space intentionally left blank
------------------------------
Date: Mon, 22 Jan 2001 16:25:56 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Assistance in Oz
Message-Id: <xHQa6.20$zO4.4417@vic.nntp.telstra.net>
"Scott Freeman" <scott.freeman@ccasoftware.com.au> wrote in message
news:TkOa6.16$zO4.4057@vic.nntp.telstra.net...
> Apologies if this is an inappropriate forum, but I am desperately
seeking
> perl programmers for numerous projects around Australia. I have
sourced
> Australia heavily, but have drawn a resounding blank with local
talent.
> Having observed this newsgroup over the last few days, there is a
plethora
> of intellectual property floating around. Does anyone know a top
shelf
> programmer wishing to live the high life in Australia (beaches, food
and
> wine, friendly people) or direct me to a forum where I might find one.
Only
> top class programmers should consider applying. Apologies again for
my
> intrusion.
>
Sounds like Queensland to me...
Wyzelli
--
bottom class Perl programmer in Darwin
------------------------------
Date: Mon, 22 Jan 2001 17:18:18 +1000
From: "Merlin" <robert@chalmers.com.au>
Subject: Re: Assistance in Oz
Message-Id: <qeRa6.1$re1.936@nsw.nnrp.telstra.net>
> > of intellectual property floating around. Does anyone know a top
> shelf
> > programmer wishing to live the high life in Australia (beaches, food
> and
> > wine, friendly people)
and what programmer worth his salt is going to have time for any of that
anyway.... :-)
Sounds like Cairns even.
>
------------------------------
Date: Mon, 22 Jan 2001 05:56:24 -0000
From: "Jerry Pank" <me@jp1.co.uk>
Subject: Re: Counting elements in an array (foreach)
Message-Id: <94gl8k$sgo$1@plutonium.btinternet.com>
Jim Monty <monty@primenet.com> wrote in message
news:94bbe5$sqq$1@nnrp2.phx.gblx.net...
> Jerry Pank <me@jp1.co.uk> wrote:
> > Perl special variable for counting elements in an array (foreach etc)
> >
> > If I wish to count elements whilst looping through an array, I resort to
$i
> > as below.
> >
> > I would have thought perl would have had a `special' variable for this.
> > There probably is but I can't find one in my reference material.
>
> There's no need for a 'special' loop counter variable in Perl. The
> number of elements in the array @array is given by @array in a scalar
> context. For example:
>
> my $number_of_elements = @array;
>
> You can force a scalar context using the scalar function. For
> example:
>
> print scalar @array; # print number of elements of @array
>
> And the last index of the array @array is given by $#array.
>
> So...
>
> > #!bin/perl5 -w
>
> Shouldn't that be '#!/bin/perl5 -w'?
>
> > use strict;
> > my @array=(1..100);
> > my $i;
> > foreach my $element(@array) {
> > $i++;
> > # do stuff
> > print "Done element $i\n";
> > }
>
> You're simply using the wrong idiom.
>
> foreach (0 .. $#array) {
> # $_ is index of @array, $array[$_] is corresponding element
> }
>
> foreach my $i (0 .. $#array) {
> # $i is index of @array, $array[$i] is corresponding element
> }
>
> for (my $i = 0; $i <= $#array; $i++) {
> # $i is index of @array, $array[$i] is corresponding element
> }
>
> foreach (@array) {
> # $_ is element of @array, index is unknown
> }
>
> foreach my $element (@array) {
> # $element is element of @array, index is unknown
> }
>
> Any of those foreach's can be (and often are) abbreviated to for.
> "for" example:
>
> for (0 .. $#array) { ... }
>
> --
> Jim Monty
Thanks for your time on this Jim. Maybe I should have given a better
example (without numbers in the array) eg:
my @words = qw(fizz buzz foo bar flurp frap);
my $i=0;
foreach my $word (@words) {
print "3rd Word is $word\n" if $i == 2;
$i++;
}
My point is that I expected perl to have a `special' variable that I could
use without having to resort to $i every time.
--
j
me@jp1.co.uk
------------------------------
Date: Mon, 22 Jan 2001 08:40:54 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Counting elements in an array (foreach)
Message-Id: <slrn96nsgl.2q0.bernard.el-hagin@gdndev25.lido-tech>
On Mon, 22 Jan 2001 05:56:24 -0000, Jerry Pank <me@jp1.co.uk> wrote:
>
>Thanks for your time on this Jim. Maybe I should have given a better
>example (without numbers in the array) eg:
>
>my @words = qw(fizz buzz foo bar flurp frap);
>my $i=0;
>foreach my $word (@words) {
> print "3rd Word is $word\n" if $i == 2;
> $i++;
>}
>
>My point is that I expected perl to have a `special' variable that I could
>use without having to resort to $i every time.
Either you've chosen the wrong subject for your post (since you don't
need to actually count elements in an array), you've chosen the wrong
example to illustrate your question (since looping through an entire
array just to print its third element is indubitably dubious) or you
want to know whether there's an internal counter which you could access
to find out which element of an array a loop is currently on. So which
is it?
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: Mon, 22 Jan 2001 10:20:48 GMT
From: jce2000@my-deja.com
Subject: ERROR: Bad arg length for Socket
Message-Id: <94h1ht$6pi$1@nnrp1.deja.com>
Hi,
I write a little perl program using Net::FTP and I receive this
message:
Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be
16 at /usr/lib/perl5/5.00503/i386-linux/Socket.pm line 295.
I need send over 400 files with this program, sometimes send 50 files,
other times 75, other 25,....
I'm using Redhat 6.2 and I tried to update some modules but the
results is the same.
Perl Version: 5.005_03 built for i386-linux.
IO:Socket: 1.25
Net::FTP: 2.56 (libnet-1.0703)
Socket: 1.7
With RedHat 7.0 with Perl 5.6 I haven't this problem. I DON't want to
update Perl 5.005_03 to 5.6. Any suggestion?
Thanks,
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Sun, 21 Jan 2001 21:50:00 -0800
From: "Donald Dahlman" <druid@nift.net>
Subject: help with this please
Message-Id: <DHPa6.9$Vb.983397@news.randori.com>
$character_name= "$cgi_data{'password'}";
print "$cgi_data{'password'}\n";
the first line faults
the second line works ok, can someone tell me
what I am doing wrong.
------------------------------
Date: Mon, 22 Jan 2001 06:50:50 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: help with this please
Message-Id: <slrn96nm1g.ajd.efflandt@efflandt.xnet.com>
On Sun, 21 Jan 2001 21:50:00 -0800, Donald Dahlman <druid@nift.net> wrote:
>$character_name= "$cgi_data{'password'}";
>
>print "$cgi_data{'password'}\n";
>
>the first line faults
>the second line works ok, can someone tell me
>what I am doing wrong.
Why are you putting quotes around $cgi_data{'password'} in the assignment?
You don't say where you get %cgi_data from. Maybe you made a typo or
$cgi_data{'password'} contains a list instead of a scalar. You could test
that theory by trying: @character_name = $cgi_data{'password'};
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: Mon, 22 Jan 2001 07:08:39 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: How do I read back saved-form data? (Perl Cookbook, pp698-700). a struggling perl learner....
Message-Id: <slrn96nn2t.ajd.efflandt@efflandt.xnet.com>
On Mon, 22 Jan 2001 13:31:59 +1000, Merlin <robert@chalmers.com.au> wrote:
>If this is called from a web page, as a CGI forexample, it saves all data
>from the page...
>...................................
>referenceID=980119247
>affiliate_id=
>reg_username=robert
>reg_password=12345
>reg_domain=
>reg_type=new
>bulk_order=0
>period=1
>domain=chalmers.com
>owner_first_name=Robert
>owner_last_name=Chalmers
>owner_org_name=dodgey brothers
>owner_address1=P.O.003
>owner_address2=
>owner_address3=
>..........................
>
>
>open(FH, ">/tmp/form.dat") or die "Can't append to log: $!";
>flock(FH, 2) or die "Can't lock log: $!";
>my $query = CGI->new();
> $query->save(*FH);
> close(FH) or die "Can't close datalog: $!";
>............................................................................
>.
>
>
>Now, if this is the code to read it back.... How on earth do I stuff the
>data into %HTML in the same format. variable=value.
>I know it's really simple, but I can't see it....
>
>========================
>my %HTML;
>open(FH, "< /tmp/form.dat") or die "Cant open dat file: $!";
>flock(FH, 1) or die "Can't lock dat file: $!";
>
>while ($query = CGI->new(*FH)) {
> last unless $query->param();
I don't know where you got that from, but perldoc CGI says you do it:
$query = new CGI(FH);
Then assuming you have already printed header and start_html you could do
something like this:
foreach ($query->param) {
print ucfirst($_), ': ', $query->textfield($_),br;
}
Or you can use $query->hidden($_) for hidden fields. But for a mixture of
field types you would have to do some sort of filtering or possibly save
several sets of data with the same variable names saving the field types
and field labels. You could retrieve them with 3 different query sets
from the same file, or a different common file for type and labels:
$query = new CGI(FH);
$type = new CGI(FH);
$label = new CGI(FH);
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
------------------------------
Date: Mon, 22 Jan 2001 05:25:49 GMT
From: david5517@my-deja.com
Subject: Re: HTML::Form Examples
Message-Id: <94gg8p$pu7$1@nnrp1.deja.com>
In article <94a19q$s27$1@nnrp1.deja.com>,
adms1@cts.com wrote:
> I am looking for example scripts using the HTML::Form module. Or, if
> anyone could provide a example in a reply.
>
> Thank You!
>
> Sent via Deja.com
> http://www.deja.com/
>
Are you wanting to create a script that processes the form? If not, you
don't need script to create a form:
<FORM METHOD="post" ACTION="http:mysite/cgi-bin/script.cgi">
<INPUT TYPE="text" NAME="textbox" LENGTH="40">
</FORM>
That is all you need to do to create a form.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 22 Jan 2001 10:24:34 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: input_record_separator error
Message-Id: <94h1p2$a4d$1@mamenchi.zrz.TU-Berlin.DE>
Bill Smith <apobull@my-deja.com> wrote in comp.lang.perl.misc:
>Perl was recently upgraded here to V5.6 using the version from
>www.perl.com. Since that upgrade, I have had several scripts return
>the following error:
>
>input_record_separator is not supported on a per-handle basis
>at /opt/perl-5.6.0/site_lib/QIP.pl line 110
>input_record_separator is not supported on a per-handle basis
>at /opt/perl-5.6.0/site_lib/QIP.pl line 112
>
>I have these scripts running via cron. These two lines repeat well
>over 100 times in the "Output from cron message".
>
>The code it's complaining about is below.
>
> input_record_separator $fh ": ";
> chomp($_ = ReadLine(1, $fh));
> input_record_separator $fh "\n";
The function (or method) input_record_separator is not a standard
Perl function. It must be part of one of the modules you're using,
probably QIP itself. Consult its documentation, its source and
its author.
Anno
------------------------------
Date: Mon, 22 Jan 2001 05:37:41 GMT
From: amit_mathur@my-deja.com
Subject: Re: interesting regex?
Message-Id: <94ggv5$qc9$1@nnrp1.deja.com>
In article <slrn96ma60.gmu.tadmc@tadmc26.august.net>,
tadmc@augustmail.com wrote:
> amit_mathur@my-deja.com <amit_mathur@my-deja.com> wrote:
>
> >Hi Tad, nobull:
>
> Who is Tad and nobull?
>
> Can't be anyone in this thread, or else there would be Message IDs
> in the References header indicating which of Tad's and/or nobull's
> messages you are referring to.
>
> The only ID in References is the original post, so that is what
> amit is following up to. No Tad there. No nobull there.
>
> You should have said "Hi David" instead, he is the only other
> person who's post you have made reference to.
>
> Please don't break stuff like that. If you are following up to
> an article, then the ID for that article should be in your
> References header. That is what the References header is for.
>
Sorry Tad,
Actually i wanted to reply to both you and nobull but could not figure
out how to do it, so i replied to the original message hoping one of you
will look at it. but now i realize it was a mistake. i am new to this
newsgroup and also to the whole concept of newsgroup. (and also to the
perl language, just 15 days and 1 book old!)
will you please tell me how should i reply in such cases(when i want to
reply to 2 people about their replies to a common question). should i
reply to the latest post?
very sorry for the goof.
and thank you very much for correcting me.
regards,
amit.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Mon, 22 Jan 2001 00:06:48 -0600
From: "Hawk" <someguyREMOVE@REMOVEsunflower.com>
Subject: Re: Internal Server Error- Newbie Question.
Message-Id: <t6njigmuv3gg0d@corp.supernews.com>
Andrew,
Sounds like you might have uploaded in in binary by mistake. As long as
your path to perl is correct, permissions are correct and it was uploaded in
ascii you'll have a hard time getting a script to return a 500 error.
Cheers,
-Tony
Andrew P <aplata@primus.ca> wrote in message
news:iBIa6.226$R15.30221372@news1.tor.primus.ca...
> Thanks for responding David,
>
>
> my error_logs said: premature end of script headers.
>
> >your shell thinks it is wrong because the script has been infected by
> Windows (not found: perl is really not found: perl^M) because you
> neglected to remove the carriage returns. Unix (Linux) just uses a
> linefeed.
>
> Does this have something to do with the fact that I downloaded the script
as
> a binary file and not a ascii file?
> How do I change it to linefeed?
>
>
> Thanks,
>
> Andrew P
>
>
>
> "David Efflandt" <efflandt@xnet.com> wrote in message
> news:slrn96mhea.a51.efflandt@efflandt.xnet.com...
> > On Sun, 21 Jan 2001 13:08:53 -0500, Andrew P <aplata@primus.ca> wrote:
> > > I am running apache server under Red Hat 6.2. At the moment I am
> receiving
> > >Error Msg 500: Internal Server
> > > Error while trying to run a perl script. I know the script works
because
> > >when the Form Action points to another webserver it works fine.
> >
> > Most likely is that either the shebang line has the wrong path to perl
or
> > your shell thinks it is wrong because the script has been infected by
> > Windows (not found: perl is really not found: perl^M) because you
> > neglected to remove the carriage returns. Unix (Linux) just uses a
> > linefeed.
> >
> > Since it is YOUR server, what do the apache access_log and error_log
say?
> >
> > But don't answer here if it is not a Perl question. Refer to the *.cgi
> > newsgroup and their FAQ for CGI questions or the *.www.servers.unix
> > newsgroup for apache questions after consulting apache docs.
> >
> > --
> > David Efflandt efflandt@xnet.com http://www.de-srv.com/
> > http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
> > http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
>
>
------------------------------
Date: Mon, 22 Jan 2001 00:01:39 -0600
From: "Hawk" <someguyREMOVE@REMOVEsunflower.com>
Subject: Re: Newbie: Anyone heard of Mail::Sender?
Message-Id: <t6nj8td0g9o656@corp.supernews.com>
Dave,
Sure, documentation for Mail::sender may be found at
http://theoryx5.uwinnipeg.ca/CPAN/data/Mail-Sender/Sender.html. You will
probably have to modify your script accordingly, but it really shouldn't be
a big deal.
Cheers
-Tony
P.S. You might want to look for a host who DOES allow sendmail. It's pretty
much standard with any *nix host (except those who are paranoid).
sound <sound@sound-web.co.uk> wrote in message
news:fsvm6t8vuneq8mvil4v2vsn3vpuqrko98b@4ax.com...
> Hi,
>
> I am a complete Newbie to perl and have had trouble getting a script
> that will handle a form to email submission. Every script I have seen
> seems to use Sendmail, but my ISP says it doesn't support that and
> provides me with an example that uses Mail::sender instead. However,
> there is no form parsing in this example and I was wondering how to go
> about converting another script to use this Mail::sender thingie.
>
> (Or even better, has anyone seen a script that uses such a
> modification)
>
> Any help would be appreciated, even if I am barking up the wrong tree.
>
> Thanks
>
> Dave
------------------------------
Date: Mon, 22 Jan 2001 09:02:10 +0100
From: "Michael Schlueter" <Michael.Schlueter@philips.com>
Subject: Re: percentages, how?
Message-Id: <3a6be905$0$8787$4dbef881@businessnews.de.uu.net>
Godzilla!,
Nice idea to simply use copies of the characters. (You utilized inventive
principle #26"copying", BTW. Very good.)
It was also fun to look at the other solutions posted here. Looks like this
is a good question for an enjoyable contest.
Michael Schlueter
------------------------------
Date: Mon, 22 Jan 2001 00:06:41 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Posting Guidelines (was Re: Perl - Bytecode, Compile to C, Perl2EXE)
Message-Id: <comdog-8C8444.00064122012001@news.panix.com>
In article <3a6b9f6b$0$15473$7f31c96c@news01.syd.optusnet.com.au>,
"Jeffrey Grace" <gracenews@optusnet.com.au> wrote:
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrn96lnto.gb2.tadmc@tadmc26.august.net...
> > >#! /bin/usr/perl -Tw
> > >use Strict;
> > ^
> > We wouldn't want to include code with syntax errors though :-)
> Thats a syntax error?? I cut and pasted it (just checked it then to be sure)
> from a working, error free CGI script.
sounds like you might be working on Windows. see previous discussions
on how Window's strange notion of filenames causes this problem.
> > Checking the Perl FAQ would cut down on the number of posts too,
> > it just does not happen as it should :-(
> People stretched for time simply don't have the luxury of going through the
> rather volumous FAQ for fun.
that's why www.perldoc.com exists. don't complain about not having
time - you aren't special in that regard.
--
brian d foy <comdog@panix.com>
no longer for hire ;)
------------------------------
Date: 22 Jan 2001 00:18:41 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Quick Newbie Qeustion please...
Message-Id: <m3ofx0rwpa.fsf@mumonkan.sunstarsys.com>
"Ofir" <ofirb@jdc.org.il> writes:
> Hi all,
>
> I want to be able to determine how many lines are in a file.
^^^^^
% perldoc -q lines
> What is the way (subroutine) to check the total number of lines
> written in a file?
#!/usr/bin/perl -w
use strict;
package get;
sub clue { exec("perldoc", "perldoc") }
get a clue
__END__
--
Joe Schaefer
------------------------------
Date: 22 Jan 2001 06:23:02 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Quick Newbie Qeustion please...
Message-Id: <94gjk6$rtd$1@bob.news.rcn.net>
Joe Schaefer <joe+usenet@sunstarsys.com> wrote:
> #!/usr/bin/perl -w
> use strict;
> package get;
> sub clue { exec("perldoc", "perldoc") }
> get a clue
> __END__
That's not valid indirect-object syntax; you'd need something like:
package a;
sub get {exec('perldoc', 'perldoc') if shift() eq 'clue'}
get a clue;
------------------------------
Date: 22 Jan 2001 06:35:16 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Quick Newbie Qeustion please...
Message-Id: <94gkb4$rtd$3@bob.news.rcn.net>
Eric Bohlman <ebohlman@omsdev.com> wrote:
> Joe Schaefer <joe+usenet@sunstarsys.com> wrote:
>> #!/usr/bin/perl -w
>> use strict;
>> package get;
>> sub clue { exec("perldoc", "perldoc") }
>> get a clue
>> __END__
> That's not valid indirect-object syntax; you'd need something like:
> package a;
> sub get {exec('perldoc', 'perldoc') if shift() eq 'clue'}
shift(@ARGV)
> get a clue;
------------------------------
Date: 22 Jan 2001 01:44:54 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Quick Newbie Qeustion please...
Message-Id: <m3k87orspl.fsf@mumonkan.sunstarsys.com>
ebohlman@omsdev.com (Eric Bohlman) writes:
> Joe Schaefer <joe+usenet@sunstarsys.com> wrote:
> > #!/usr/bin/perl -w
> > use strict;
>
> > package get;
>
> > sub clue { exec("perldoc", "perldoc") }
>
> > get a clue
>
> > __END__
>
> That's not valid indirect-object syntax; you'd need something like:
>
> package a;
>
> sub get {exec('perldoc', 'perldoc') if shift() eq 'clue'}
>
> get a clue;
>
Not really; if you don't like the "package get;" line,
you can just comment it out. The syntax is just fine either
way. Try running the original first, though ;)
--
Joe Schaefer
------------------------------
Date: 22 Jan 2001 09:51:48 GMT
From: abigail@foad.org (Abigail)
Subject: Re: warning! moronzilla is back
Message-Id: <slrn96o0lk.oiu.abigail@tsathoggua.rlyeh.net>
Uri Guttman (uri@sysarch.com) wrote on MMDCCI September MCMXCIII in
<URL:news:x7wvbow5kl.fsf@home.sysarch.com>:
\\ [To Kira]
\\
\\ here is the only place where
\\ you can even show your hidden self and not be filtered out
\\ completely.
Any group can easily deal with a troll. Trolls are easily filtered out
EXCEPT WHEN THERE ARE MORONS WHO KEEP REPLYING AND QUOTING THE TROLL.
*plonk*
Abigail
--
perl -wle'print"Κυστ αξοτθες Πεςμ Θαγλες"^"\x80"x24'
------------------------------
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 115
**************************************