[14001] in Perl-Users-Digest
Perl-Users Digest, Issue: 1411 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 17 18:20:37 1999
Date: Wed, 17 Nov 1999 15:15:30 -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: <942880530-v9-i1411@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 17 Nov 1999 Volume: 9 Number: 1411
Today's topics:
Re: OO woes (David Cantrell)
Re: OO woes <gellyfish@gellyfish.com>
Opening a file and associating its filehandle with a sp g0177325@my-deja.com
perl 5.004_04 <lavell@fhs.csu.McMaster.CA>
Re: perl 5.004_04 (Kragen Sitaker)
Re: Perl bug??? help me!!! (Kragen Sitaker)
Re: Perl bug??? help me!!! <cassell@mail.cor.epa.gov>
Re: Perl bug??? help me!!! (Brett W. McCoy)
Re: Perl bug??? help me!!! <lr@hpl.hp.com>
Re: Perl Programmers Needed. Dallas, Texas USA (experie <cassell@mail.cor.epa.gov>
Re: Perl Programmers Needed. Dallas, Texas USA (experie <gellyfish@gellyfish.com>
Re: Perl Programmers Needed. Dallas, Texas USA (experie (David H. Adler)
Re: Perl Programmers Needed. Dallas, Texas USA (experie <thirdrck@earthlink.net>
Posting an Array to a URL wesley67@my-deja.com
Problem compiling pgsql_perl5-1.7.3 rknaak@my-deja.com
Re: Problem with the sentence "use Win32::ODBC;" <cassell@mail.cor.epa.gov>
Re: Rand Number without the decimals!! (Martien Verbruggen)
removing unwanted parts of a string... schablone@my-deja.com
Re: removing unwanted parts of a string... <lr@hpl.hp.com>
Re: Show me a better way! <peter@berghold.net>
signature question (was Re: Help with Stoopid Nutscrape arvind@mail.ece.umn.edu
Re: signature question (was Re: Help with Stoopid Nutsc <lr@hpl.hp.com>
Re: signature question (was Re: Help with Stoopid Nutsc <rootbeer@redcat.com>
Re: signature question (was Re: Help with Stoopid Nutsc <sariq@texas.net>
Re: signature question (was Re: Help with Stoopid Nutsc arvind@mail.ece.umn.edu
Re: signature question (was Re: Help with Stoopid Nutsc <lr@hpl.hp.com>
Re: signature question (was Re: Help with Stoopid Nutsc (Craig Berry)
Re: Sys::Syslog - h2ph <vahdat@informatik.uni-leipzig.de>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 17 Nov 1999 17:18:10 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: OO woes
Message-Id: <3832d1ed.76756159@10.0.0.155>
[This is a digest-type reply to several posts in this thread]
My thanks to all those who responded. Yes, I know it's a horrible
kludge, but my reasoning is ...
As some of you will know, I'm developing a set of modules for parsing
Shockwave Flash files. Flash files consist of a series of 'tags',
each of which I am representing with an object. Each tag can consist
of several complex datatypes, which I am again representing with
objects. I would *like* all the Flash::Datatype::* objects to be
created the same way, by passing them a blob of binary data and an
offset in that data and let them work the rest out themselves.
To have all datatypes' constructors take an extra parameter for their
creator object just seems wrong if they don't need it; to have some
datatypes require this extra parameter presents a messy interface to
those who may be using my Datatype objects to implement Tag objects.
Hence my desire to delve into the stack and find out for myself who my
caller was.
Devel::DumpStack provides exactly what I was looking for (thanks
Damian) and does not require any C code - a Good Thing, as it'll work
on Activestate too and maybe even with Macperl.
Some code snippets ...
use Devel::DumpStack;
sub new
{ my $me={};
$me->{creator}=(Devel::DumpStack::caller2(1))[0]->[0];
# etc...
}
sub horridDecodeyStuff
{ my $me=shift;
my $advanceBits=$me->getCreator->getGlyphBits;
# and so on
}
I am aware of the dangers of allowing access to all the methods of
$me->creator but feel that in this case, it is the lesser evil.
<ARGUMENT TYPE=RELIGIOUS>
And, as someone who wants to remain nameless said over lunch, this
would be easy in Java.
</ARGUMENT>
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: 17 Nov 1999 22:57:32 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: OO woes
Message-Id: <80vbss$4c3$1@gellyfish.btinternet.com>
On Wed, 17 Nov 1999 17:18:10 GMT David Cantrell wrote:
>
> As some of you will know, I'm developing a set of modules for parsing
> Shockwave Flash files.
>
You're one sick puppy Cantrell ;-}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 17 Nov 1999 22:29:36 GMT
From: g0177325@my-deja.com
Subject: Opening a file and associating its filehandle with a specific fd
Message-Id: <80va85$i2q$1@nnrp1.deja.com>
I'm probably missing something, but is there any way to do the following
without using the POSIX module?
open FOO5, ">/tmp/foo";
open FOO5, ">&=" . POSIX::dup2(fileno FOO5, 5);
# thus, fileno(FOO5) == 5
Things like open FOO5, ">=&5"; just don't quite get me there.
Thanks,
John.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 13:23:39 -0500
From: Paul Lavell <lavell@fhs.csu.McMaster.CA>
Subject: perl 5.004_04
Message-Id: <Pine.HPP.3.91.991117132157.22107A-100000@fhs.csu.McMaster.CA>
Good Day ...
I have a HP Unix system that I need to run Perl version 5.004_04, can
anyone tell me where I can get a copy of this version.
Thanks.
Paul
------------------------------
Date: Wed, 17 Nov 1999 19:52:02 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: perl 5.004_04
Message-Id: <CHDY3.21973$YI2.993358@typ11.nn.bcandid.com>
In article <Pine.HPP.3.91.991117132157.22107A-100000@fhs.csu.McMaster.CA>,
Paul Lavell <lavell@fhs.csu.McMaster.CA> wrote:
>I have a HP Unix system that I need to run Perl version 5.004_04, can
>anyone tell me where I can get a copy of this version.
CPAN.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 17 Nov 1999 19:06:20 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl bug??? help me!!!
Message-Id: <M0DY3.21902$YI2.988130@typ11.nn.bcandid.com>
In article <3832F9A3.792957B@inea.com.ar>,
Diego Fernandez <nightwolf@inea.com.ar> wrote:
>print ("Bug" == "B");
>
>it returns 1 !!!! True!
Use -w. == is numeric comparison; Bug and B are both 0, numerically.
You want eq.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 17 Nov 1999 12:13:28 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl bug??? help me!!!
Message-Id: <38330C68.3A1EE4EE@mail.cor.epa.gov>
Diego Fernandez wrote:
>
> Try this :
>
> print ("Bug" == "B");
>
> it returns 1 !!!! True!
>
> What is wrong?!
What's wrong is that you're using the wrong comparison there.
And you immediately assumed it was a bug, rather than an error
on your part. Two very bad things.
I strongly suggest that you get a copy of "Elements of
Programming with Perl" by Andrew Johnson, and learn enough
Perl for your needs.
> I need to look for a value in an array using grep but is behavior makes
> my program fail because I use :
>
> if (grep(/Value/, @list) { ....
>
> and Value match with Value1 ... Value2.
> so I try if (grep { $_ == "Value"} @list) but it fails too.
Because you appear to be misusing grep() and m// and == ,
and possibly a few other features. If you use the pattern
match /Value/ against a word like 'Value1' then it *matches*.
Because the pattern is contained inside the word.
Since it is totally unclear what you actually want to do
[as opposed to what you have coded], I cannot give you
any better advice.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 17 Nov 1999 21:11:53 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Perl bug??? help me!!!
Message-Id: <slrn8366l1.cba.bmccoy@moebius.foiservices.com>
Also Sprach Diego Fernandez <nightwolf@inea.com.ar>:
>Try this :
>
>print ("Bug" == "B");
>
>it returns 1 !!!! True!
>
>What is wrong?!
You are using == (which is for comparing numbers) to compare strings.
Perl is trying to make your strings numbers, but since there are no
numbers involved, they are both the same thing. Try running this with the
-w and use strict -- it won't even compile the program.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: Wed, 17 Nov 1999 13:45:50 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Perl bug??? help me!!!
Message-Id: <MPG.129cc1ed62e4cbbe98a223@nntp.hpl.hp.com>
In article <slrn8366l1.cba.bmccoy@moebius.foiservices.com> on Wed, 17
Nov 1999 21:11:53 GMT, Brett W. McCoy <bmccoy@foiservices.com> says...
> Also Sprach Diego Fernandez <nightwolf@inea.com.ar>:
>
> >Try this :
> >
> >print ("Bug" == "B");
> >
> >it returns 1 !!!! True!
> >
> >What is wrong?!
>
> You are using == (which is for comparing numbers) to compare strings.
> Perl is trying to make your strings numbers, but since there are no
> numbers involved, they are both the same thing. Try running this with the
> -w and use strict -- it won't even compile the program.
Nicht wahr!
#!/usr/local/bin/perl -w
use strict;
print 'Bug' == 'B';
__END__
Argument "B" isn't numeric in eq at e:/test/foo.txt line 4.
Argument "Bug" isn't numeric in eq at e:/test/foo.txt line 4.
1
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 Nov 1999 11:57:27 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
To: Sandbox Studios HR <jobs@sandboxstudios.com>
Subject: Re: Perl Programmers Needed. Dallas, Texas USA (experienced only)
Message-Id: <383308A7.D4EEB81A@mail.cor.epa.gov>
[other newsgroups trimmed, including comp.lang.perl]
Sandbox Studios HR wrote:
>
> Hello.
>
> We're hiring full-time and part-time Perl programmers for our Dallas
> offices. Experienced programmers only. Work on different Internet related
> projects.
That's nice. Perhaps you are unaware that job offers are not
appropriate for this newsgroup. Please submit them in groups
which actually have the word 'jobs' in the title.
And if you don't know that comp.lang.perl has been extinct
for several years, you may not be the sort of employer a
Perl programmer wants to work for.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 17 Nov 1999 21:43:50 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Programmers Needed. Dallas, Texas USA (experienced only)
Message-Id: <80v7im$46p$1@gellyfish.btinternet.com>
In comp.lang.perl.misc Sandbox Studios HR <jobs@sandboxstudios.com> wrote:
>
> Send resume, URL and/or sample code to jobs@sandboxstudios.com
>
Sorry I sent all my sample code to the newsgroup earlier and the URL is
in the .sig ... Oh and I dont own one of those big hats so I cant work
in Dallas OK...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 17 Nov 1999 17:13:14 -0500
From: dha@panix.com (David H. Adler)
Subject: Re: Perl Programmers Needed. Dallas, Texas USA (experienced only)
Message-Id: <slrn836a3p.eed.dha@panix.com>
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
.... nononono. And to use nonononono just to negate that is, uhm,
confusing. Someone might think I'm stuttering.
- Abigail, p5p
------------------------------
Date: Wed, 17 Nov 1999 14:20:08 -0800
From: "Jeff S. Dickson" <thirdrck@earthlink.net>
Subject: Re: Perl Programmers Needed. Dallas, Texas USA (experienced only)
Message-Id: <38332A18.41C67EA6@earthlink.net>
Sandbox Studios HR wrote:
>
> Hello.
>
> We're hiring full-time and part-time Perl programmers for our Dallas
> offices. Experienced programmers only. Work on different Internet related
> projects.
>
> Send resume, URL and/or sample code to jobs@sandboxstudios.com
>
> Regars,
> Steve Bergenholtz
> http://www.sandboxstudios.com
What's the point of advertising world wide for jobs specific to a
particular area?
Jeff
------------------------------
Date: Wed, 17 Nov 1999 21:46:57 GMT
From: wesley67@my-deja.com
Subject: Posting an Array to a URL
Message-Id: <80v7o9$ga6$1@nnrp1.deja.com>
I need to post an array or filehandle to a URL on a remote server.
Is there a command in PERL which accomplishes this??
Sincerely,
Wester
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 19:02:53 GMT
From: rknaak@my-deja.com
Subject: Problem compiling pgsql_perl5-1.7.3
Message-Id: <80uu4q$8kp$1@nnrp1.deja.com>
I am in the process of moving an web app from a
redhat5 box to redhat 6.1 and am try to compile
pgsql_perl5-1.7.3 that I downloaded from CPAN.
When I try to run make, I get this message.
Any ideas?
cc -c -I/include -I/usr/local/include/pgsql -
I/usr/include/pgsql -Dbool=char -DH
AS_BOOL -I/usr/local/include -O2 -
DVERSION=\"1.7.3\" -DXS_VERSION=\"1.7.3\" -
fpic -I/usr/lib/perl5/5.00503/i386-linux/CORE
Pg.c
Pg.xs: In function `XS_Pg_PQexec':
Pg.xs:321: sizeof applied to an incomplete type
Pg.xs: In function `XS_PG_conn_exec':
Pg.xs:755: sizeof applied to an incomplete type
make: *** [Pg.o] Error 1
Thanks in advance for any help.
Rob
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 12:00:02 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Problem with the sentence "use Win32::ODBC;"
Message-Id: <38330942.F74B37DF@mail.cor.epa.gov>
Kragen Sitaker wrote:
>
> In article <3831E4C7.F6D10B29@mail.cor.epa.gov>,
> David Cassell <cassell@mail.cor.epa.gov> wrote:
[snip]
> >Using MS Access in a website is a mistake. It is not robust
> >enough, and it cannot handle the multi-user situations which
> >a website is supposed to handle.
>
> I think there are probably cases where you have only one person
> accessing a database through a website and Access might be OK. And,
A possibility. But do you need a website for that case?
[That's a rhetorical question.]
> hey, I use the Unix filesystem in CGI scripts all the time, and it
> doesn't even have the level of multi-user functionality that Access
> does. :)
Unfortunately, the unix file-system seems to handle multiple
users *better* than MS Access. This is also true of most
wastebaskets. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 17 Nov 1999 22:31:26 GMT
From: mgjv@wobbie.heliotrope.home (Martien Verbruggen)
Subject: Re: Rand Number without the decimals!!
Message-Id: <slrn836b72.q08.mgjv@wobbie.heliotrope.home>
On 14 Nov 1999 23:44:54 -0500,
Uri Guttman <uri@sysarch.com> wrote:
> >>>>> "MV" == Martien Verbruggen <mgjv@comdyn.com.au> writes:
[snip]
>
> MV> Well... In _theory_ the number will repeat itself, and there's a
> MV> slught chance that it will happen during the life time of one of those
> MV> sessions. In _practice_ that chance may be negligible.
>
> in practice it probably isn't negligible. perl's default rand (from
> unix) generates only 16 bits and is notoriously poor in its distribution
> and has other problems.
That's why I added the qualifier 'during the life time of one of those
sessions'. Of course, I don't really know what that life time is. I
assumed it was to 'keep state' during a visit of a person to some web
site. An assumption without reason.
> MV> If you combine it with the process id, the chance gets even smaller.
>
> there are better ways to generate temp files. if they are all within a
> single process, a sequence number (mktemp) is fine. among multiple
> processes, a locked file with a sequence number is good.
The original poster mentioned $ENV{REMOTE_HOST}, which led me to assume
that this was about a CGI script. That means that it wouldn't be a
single process. I agree however, that keeping a commonly accessible
sequence number is the most reliable way to go. Whether that be a file
or a database is immaterial :)
Of course, with a monotonically incrementing sequence number, one will
have to be slightly cautious about how it's treated. A simple integer
may overflow too easily. But that's a different discussion for a
different place.
Martien
--
Martien Verbruggen |
Interactive Media Division | Unix is user friendly. It's just
Commercial Dynamics Pty. Ltd. | selective about its friends.
NSW, Australia |
------------------------------
Date: Wed, 17 Nov 1999 21:18:46 GMT
From: schablone@my-deja.com
Subject: removing unwanted parts of a string...
Message-Id: <80v63h$f0c$1@nnrp1.deja.com>
‚r‚ƒ‚ˆablonski here again. I'm still on my mission to dominate the world
by a combination of skill, cunning and doing dastardly things to
helpless vegetables, but I've come up against a few hurdles. So if
anyone
could spare a few moments from their pre-millennial preparations /
vegetable rights activities eternal
gratitude at least until next Tuesday is yours for the asking (plus a
small contribution for shipping).
The Problem:
With the following code I wish to remove all the contents from a given
variable except
for a word beginning with, for example, "&", using a regular expression.
Is there a way
of doing this in one line? The only way I have come up with is to
perform a regular
expression a la $mytext =~ m/&\w* / then assign the resulting $& to
$mytext.
Viz:
#!/usr/bin/perl -w
use strict;
my $message = "Vote for Schablonski or have your &thingy cut off!";
$message =~ m/&\w* /;
$message = $&;
# do whatever else I want to do with &thingy..
exit(0);
Is there another way?
Schablonksi
If I ruled the world... no, when I rule the world, ... dogs will be
banned from salivating over people for a start.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 14:00:23 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: removing unwanted parts of a string...
Message-Id: <MPG.129cc553359a5ae998a226@nntp.hpl.hp.com>
In article <80v63h$f0c$1@nnrp1.deja.com> on Wed, 17 Nov 1999 21:18:46
GMT, schablone@my-deja.com <schablone@my-deja.com> says...
...
> With the following code I wish to remove all the contents from a given
> variable except
> for a word beginning with, for example, "&", using a regular expression.
> Is there a way
> of doing this in one line? The only way I have come up with is to
> perform a regular
> expression a la $mytext =~ m/&\w* / then assign the resulting $& to
> $mytext.
Please fix your newsreader's line wrapping so this doesn't happen.
> Viz:
>
> #!/usr/bin/perl -w
>
> use strict;
Two style points for those!
> my $message = "Vote for Schablonski or have your &thingy cut off!";
Minus one style point for double-quotes instead of single-quotes when
there is no interpolation.
> $message =~ m/&\w* /;
> $message = $&;
>
> # do whatever else I want to do with &thingy..
>
> exit(0);
>
>
> Is there another way?
Are you unaware of the Perl motto TMTOWTDI? Of course; there are
several other ways. Here is one:
$message =~ s/.*?(&\w+ ).*/$1/s;
If you don't want the '&' and space, move the parentheses appropriately.
If there is more than one such match and you want the last one rather
than the first, remove the '?'.
All this is described in perlop and perlre, of course. Read, read,
read...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 Nov 1999 21:39:14 GMT
From: "Peter L. Berghold" <peter@berghold.net>
Subject: Re: Show me a better way!
Message-Id: <Pine.LNX.3.96.991117163712.14305A-100000@uboat.berghold.net>
$taxes{OH}=0.055;
$taxes{NJ}=0.060;
|
|
etc
$tax = 0;
$tax = $amount * $taxes{$cookie{state}} if $taxes{$cookie{state}};
well... you get the idea....
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Peter L. Berghold Peter@Berghold.Net
"Linux renders ships http://www.berghold.net
NT renders ships useless...." ICQ# 11455958
------------------------------
Date: 17 Nov 1999 18:22:54 GMT
From: arvind@mail.ece.umn.edu
Subject: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <80urpu$gp4$1@news1.tc.umn.edu>
In <slrn82n5gq.lmh.abigail@alexandra.delanet.com>, Abigail <abigail@delanet.com> wrote:
> Andrew Broadley (expoinfo@globalexpos.co.nz) wrote on MMCCLXIV September
> MCMXCIII in <URL:news:382B624E.23C018E6@globalexpos.co.nz>:
> Abigail
okay, so this signature I didn't get:
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
it didn't run on the command line (use of uninitialized value at -e line 1),
and gave a similiar message when I put it into a file and tried running
it.
am I missing something?
-Arvind
--
\perl -e '$n=reverse pack("C*",117,100,101,46,110,109,117,46,101,\
99,101,46,108,105,97,109,64,100,110,105,118,114,97,32,32,32,32,\
32,32,32,32,32,32,114,97,107,105,100,110,97,114,97,75,32,46,75,\
32,100,110,105,118,114,65);print "\n$n\n\n"'
------------------------------
Date: Wed, 17 Nov 1999 10:51:14 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <MPG.129c99026b63067c98a21b@nntp.hpl.hp.com>
In article <80urpu$gp4$1@news1.tc.umn.edu> on 17 Nov 1999 18:22:54 GMT,
arvind@mail.ece.umn.edu <arvind@mail.ece.umn.edu> says...
> In <slrn82n5gq.lmh.abigail@alexandra.delanet.com>, Abigail <abigail@delanet.com> wrote:
> > Andrew Broadley (expoinfo@globalexpos.co.nz) wrote on MMCCLXIV September
> > MCMXCIII in <URL:news:382B624E.23C018E6@globalexpos.co.nz>:
>
> > Abigail
>
> okay, so this signature I didn't get:
> perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
>
> it didn't run on the command line (use of uninitialized value at -e line 1),
> and gave a similiar message when I put it into a file and tried running
> it.
>
> am I missing something?
Yes. You are missing the 'shift' which drags an aregument in from the
command line.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 Nov 1999 11:05:54 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <Pine.GSO.4.10.9911171103180.15797-100000@user2.teleport.com>
On 17 Nov 1999 arvind@mail.ece.umn.edu wrote:
> okay, so this signature I didn't get:
> perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
>
> it didn't run on the command line (use of uninitialized value at -e line 1),
Try putting something shift-able on the command line (after the final
quote mark). Hint: Try a number like 25. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 17 Nov 1999 12:59:02 -0600
From: Tom Briles <sariq@texas.net>
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <3832FAF6.A7FF2F04@texas.net>
arvind@mail.ece.umn.edu wrote:
>
> In <slrn82n5gq.lmh.abigail@alexandra.delanet.com>, Abigail <abigail@delanet.com> wrote:
> > Andrew Broadley (expoinfo@globalexpos.co.nz) wrote on MMCCLXIV September
> > MCMXCIII in <URL:news:382B624E.23C018E6@globalexpos.co.nz>:
>
> > Abigail
>
> okay, so this signature I didn't get:
> perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
>
> it didn't run on the command line (use of uninitialized value at -e line 1),
> and gave a similiar message when I put it into a file and tried running
> it.
>
> am I missing something?
Yes. There's a 'shift'. Abigail put the 'w' switch in for a reason -
to give you a clue.
Abigail does *everything* for a reason, as far as I can tell.
- Tom
------------------------------
Date: 17 Nov 1999 19:57:13 GMT
From: arvind@mail.ece.umn.edu
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <80v1ap$hr0$1@news1.tc.umn.edu>
In <Pine.GSO.4.10.9911171103180.15797-100000@user2.teleport.com>, Tom Phoenix <rootbeer@redcat.com> wrote:
> On 17 Nov 1999 arvind@mail.ece.umn.edu wrote:
>> okay, so this signature I didn't get:
>> perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
>>
>> it didn't run on the command line (use of uninitialized value at -e line 1),
> Try putting something shift-able on the command line (after the final
> quote mark). Hint: Try a number like 25. Cheers!
thanks! it looks like its printing out primes less than the number on the
command line. I'll have to sit down with the docs to figure out how this
works (grep and reg. exp. to generate primes, this should be interesting)
Arvind
--
\perl -e '$n=reverse pack("C*",117,100,101,46,110,109,117,46,101,\
99,101,46,108,105,97,109,64,100,110,105,118,114,97,32,32,32,32,\
32,32,32,32,32,32,114,97,107,105,100,110,97,114,97,75,32,46,75,\
32,100,110,105,118,114,65);print "\n$n\n\n"'
------------------------------
Date: Wed, 17 Nov 1999 12:33:01 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <MPG.129cb0d6435cac1098a21f@nntp.hpl.hp.com>
In article <80v1ap$hr0$1@news1.tc.umn.edu> on 17 Nov 1999 19:57:13 GMT,
arvind@mail.ece.umn.edu <arvind@mail.ece.umn.edu> says...
> In <Pine.GSO.4.10.9911171103180.15797-100000@user2.teleport.com>, Tom Phoenix <rootbeer@redcat.com> wrote:
> > On 17 Nov 1999 arvind@mail.ece.umn.edu wrote:
>
> >> okay, so this signature I didn't get:
> >> perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
> >>
> >> it didn't run on the command line (use of uninitialized value at -e line 1),
>
> > Try putting something shift-able on the command line (after the final
> > quote mark). Hint: Try a number like 25. Cheers!
>
> thanks! it looks like its printing out primes less than the number on the
> command line. I'll have to sit down with the docs to figure out how this
> works (grep and reg. exp. to generate primes, this should be interesting)
Yes. It would be hard to write a slower algorithm, though.
Hint: The '1's in the algorithm (except for '\1') could be almost
anything.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 Nov 1999 22:45:06 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <s36bvi7ehsq79@corp.supernews.com>
Larry Rosler (lr@hpl.hp.com) wrote:
: In article <80v1ap$hr0$1@news1.tc.umn.edu> on 17 Nov 1999 19:57:13 GMT,
: arvind@mail.ece.umn.edu <arvind@mail.ece.umn.edu> says...
: > thanks! it looks like its printing out primes less than the number on the
: > command line. I'll have to sit down with the docs to figure out how this
: > works (grep and reg. exp. to generate primes, this should be interesting)
:
: Yes. It would be hard to write a slower algorithm, though.
This (like many similar JAPH tours-de-force) fits the "Dancing Bear"
category ("The remarkable thing about a dancing bear is not how well it
dances, but that it dances at all").
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "They do not preach that their God will rouse them
a little before the nuts work loose." - Kipling
------------------------------
Date: Wed, 17 Nov 1999 23:57:55 +0100
From: Navid Vahdat <vahdat@informatik.uni-leipzig.de>
Subject: Re: Sys::Syslog - h2ph
Message-Id: <383332F3.72B020C9@informatik.uni-leipzig.de>
Jonathan Stowe wrote:
>
> On Mon, 15 Nov 1999 15:35:51 +0100 Navid Vahdat wrote:
> > When using Sys::Syslog the package wants me to use h2ph to get him
> > syslog.ph. When I do so, he gets various problems. The last one is with
> > stdarg.h. Has anyone experienced similar problems?
>
> The actual error message might help - 'various problems' doesnt help
> much ...
The error is:
Constant subroutine __need___va_list undefined at
/usr/lib/perl5/site_perl/5.005/i686-linux/stdarg.ph line 9.
stdarg.ph begins:
require '_h2ph_pre.ph';
unless(defined(&_STDARG_H)) {
unless(defined(&_ANSI_STDARG_H_)) {
unless(defined(&__need___va_list)) {
eval 'sub _STDARG_H () {1;}' unless defined(&_STDARG_H);
eval 'sub _ANSI_STDARG_H_ () {1;}' unless
defined(&_ANSI_STDARG_H_);
}
undef(&__need___va_list) if defined(&__need___va_list);
------------------------------
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 V9 Issue 1411
**************************************