[22007] in Perl-Users-Digest
Perl-Users Digest, Issue: 4229 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 7 03:05:40 2002
Date: Sat, 7 Dec 2002 00:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 7 Dec 2002 Volume: 10 Number: 4229
Today's topics:
Re: [FTP] Downloading a file by matching part of its na <bobx@linuxmail.org>
A formating problem (Jan Fure)
Re: A formating problem <pinyaj@rpi.edu>
Re: barewords unexpectedly give no error <tassilo.parseval@post.rwth-aachen.de>
Re: Building Packages - Override Package Functions - In <palladium@spinn.net>
Re: creating new linux user passwd using perl (Alan Barclay)
Re: Deleting from arrays <wksmith@optonline.net>
Re: Getting a script to run properly <me@privacy.net>
Re: Getting a script to run properly <tassilo.parseval@post.rwth-aachen.de>
Re: Help Im losing faith! AoH key as a HoH key! <bwalton@rochester.rr.com>
io::socket::inet / tcp question <smackdab1@hotmail.com>
Re: Is there a better way of doing this? <GPatnude@adelphia.net>
Re: Is there a better way of doing this? (Jay Tilton)
Re: Is there a better way of doing this? (Tad McClellan)
Re: Is there a kind of sleep or wait function? <bdonlan@users.sf.net>
Multi-dimensional hash question <stremitz@consultant.com>
Re: Multi-dimensional hash question <bwalton@rochester.rr.com>
porting a routine which uses uint32_t ()
Re: read from standard-input within one command? <palladium@spinn.net>
Re: syntax for DBI Perl commands ? <rereidy@indra.com>
Re: syntax for DBI Perl commands ? <crb@wedesigns.com>
Re: syntax for DBI Perl commands ? <wksmith@optonline.net>
Re: Whee, a new JAPH <goldbb2@earthlink.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 06 Dec 2002 23:23:04 GMT
From: "Bob X" <bobx@linuxmail.org>
Subject: Re: [FTP] Downloading a file by matching part of its name (code incl.)
Message-Id: <sjaI9.384$V95.62403@news2.news.adelphia.net>
Thanks it does work!
------------------------------
Date: 6 Dec 2002 20:34:12 -0800
From: jan_may2002_fure@attbi.com (Jan Fure)
Subject: A formating problem
Message-Id: <e47a84bf.0212062034.33bd6f39@posting.google.com>
I have data in the form:
A1 0.1233
A1 1.234
A1 0.34
C3 1.4321
A5 1.24555
A5 23
A5 2
I am looking for a way to change the data above into the format:
@data = (
["A1", "A5", "C3"],
[ [0.1233, 0.34, 1.234], [1.24555, 2, 23], [1.4321]
);
The format above is a 1 to many mapping, with both values sorted by
increasing values. First column allways consists of character strings,
second column allways consists of numbers. The purpose is to make
box-plots, where A1, A5, C3 are the labels. (I am using the
GD::Graph::boxplot module).
I have found a way to get the values from the first column into an
array, and I can also capture the sets of values from second column,
but I don't know how to best store them.
My code is included below, but I suspect there is a more Perl'ish and
elegant solution, as I am using brute force, and it is not clear to me
how I would get the @data entries properly formatted. It is making it
difficult for me that the code has to deal with an arbitrary number of
elements, and I am not to good at dealing with data structures. In my
code @data2 was sorted by first column.
Jan Fure
my @TOOLS;
$TOOLS[0]=$TOOL;
my $NEWTOOL;
my $KUDD2;
my $n4=0;
my $d2;
my @DD;
foreach $d2 (@data2){
print "$_\n";
($NEWTOOL, $KUDD2) = split /\t/, $d2;
print "newtool? $NEWTOOL kudd? $KUDD2\n";
if($NEWTOOL ne $TOOL){
print "$TOOL $NEWTOOL $n4 \n";
my @$TOOLS[$n4]=@DD;
$n4++;
$TOOLS[$n4]=$NEWTOOL;
@DD=();
}
$TOOL=$NEWTOOL;
push @DD, $KUDD2;
}
my @$TOOLS[$n4]=@DD;
my $n5=0;
print "\n";
foreach(<@TOOLS>){
print "$_\n";
foreach(<@$TOOLS[$n5]>){
print "$_\n";
}
$n5++;
}
------------------------------
Date: Sat, 7 Dec 2002 00:34:41 -0500
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Jan Fure <jan_may2002_fure@attbi.com>
Subject: Re: A formating problem
Message-Id: <Pine.A41.3.96.1021207003130.18718A-100000@vcmr-104.server.rpi.edu>
On 6 Dec 2002, Jan Fure wrote:
>A1 0.1233
>A1 1.234
>A1 0.34
>C3 1.4321
>A5 1.24555
>A5 23
>A5 2
>
>I am looking for a way to change the data above into the format:
>@data = (
> ["A1", "A5", "C3"],
> [ [0.1233, 0.34, 1.234], [1.24555, 2, 23], [1.4321]
> );
Looking at the code you provided, I don't think you have a working
solution. Here is the simplest way I see of solving the problem:
# step 1 -- read the file into a hash of array-references:
my (%data, @points);
while (<INFO>) {
my ($field, $val) = split;
push @{ $data{$field} }, $val;
}
# step 2 -- convert hash of array-references
# into array of array-references
@points = (
[ keys %data ],
[ values %data ],
);
That's all he wrote!
--
Jeff "japhy" Pinyan RPI Acacia Brother #734 2002 Acacia Senior Dean
"And I vos head of Gestapo for ten | Michael Palin (as Heinrich Bimmler)
years. Ah! Five years! Nein! No! | in: The North Minehead Bye-Election
Oh. Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)
------------------------------
Date: 7 Dec 2002 07:40:27 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: barewords unexpectedly give no error
Message-Id: <ass8lb$enn$1@nets3.rz.RWTH-Aachen.DE>
Also sprach David K. Wall:
> Tassilo v. Parseval <tassilo.parseval@post.rwth-aachen.de> wrote on
> 06 Dec 2002:
>
>> Also sprach David K. Wall:
>>
>>> This bit of code executes with no errors or warnings:
>>>
>>> use strict;
>>> use warnings;
>>>
>>> sub cat {
>>> my ($r1, $r2) = @_;
>>> return @$r1, @$r2;
>>> }
>>>
>>> print cat( [1..3], ['a'..'d'] );
>>> print "\nDeref:", @{ [d,e,f] };
>>> print "\nList: ", (k,f,hh);
>>> print "\nList2: ", u,v,b,w;
> [snip]
>>
>> You must have come across a bug. I get same behaviour as you with
>> 5.6.1, but the expected compile-time errors with 5.005_03 and
>> 5.8.0. So it broke in between but was fixed thereafter.
[...]
> I suppose I should update, eh? I didn't bother because I don't
> upgrade just to be upgrading, and I don't know of any features of 5.8
> that I'm just dying to use. I suppose I will upgrade now.
ActiveState has released 5.8.0 as a beta distribution. You could install
that. For me, bugs I encountered have fortunately never been serious
enough to make me upgrade immediately. I rather upgraded to satisfy my
curiousness and, not to forget, being hip. ;-)
It would depend a little on your needs. If you are maintaining modules
or simply stuff that is supposed to be used by others several perls are
obligatory (as I had to reckognize lately with some XS code that I
developped under 5.6.1 and 5.8.0 but which at first didn't work under
5.005_03).
As for new features, perhaps there'll be the moment when you want to
work with threads or need even better Unicode support than 5.6.1 has. In
both cases 5.8.0 would be the reasonable way to go.
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;
------------------------------
Date: Fri, 6 Dec 2002 22:23:18 -0700
From: "Rod" <palladium@spinn.net>
Subject: Re: Building Packages - Override Package Functions - Including Inheritance
Message-Id: <uv33avfh5ufd1a@corp.supernews.com>
"Jay Tilton" <tiltonj@erols.com> wrote in message
news:3df128a6.168696110@news.erols.com...
> "Rod" <palladium@spinn.net> wrote:
> our @EXPORT = @TestMe_1_1::EXPORT;
Cool. Thanks.. Haven't seen this one before .I like it..Much easier.
> Or put '@EXPORT' into TestMe_1_1 's @EXPORT array.[1]
> (Oh wow. Heavy. Far out.)
I won't ! :-)
Thanks for all the feedback...I appreciate it.
Rod
------------------------------
Date: 6 Dec 2002 23:58:23 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: creating new linux user passwd using perl
Message-Id: <1039219105.832996@elaine.furryape.com>
In article <ab3b13db.0212052224.2885a184@posting.google.com>,
Mitchell Laks <mlaks2000@yahoo.com> wrote:
>Hi i am trying to use perl script to create a new user passwd. the
>following script almost works
If you have to ask, you don't have the skills to do it safely.
------------------------------
Date: Sat, 07 Dec 2002 03:38:43 GMT
From: "Bill Smith" <wksmith@optonline.net>
Subject: Re: Deleting from arrays
Message-Id: <73eI9.4153$CU3.2727@news4.srv.hcvlny.cv.net>
<ctcgag@hotmail.com> wrote in message
news:20021206165907.852$PG@newsreader.com...
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> > According to Bill Smith <wksmith@optonline.net>:
>
> > > It seems that "exists $list[4]" and
> > > "defined $list[4]" should always give the same result. If so, I
prefer
> > > "defined".
> > >
> > > Could anyone give an example where this is not true?
> >
> > An array element exists if its index is smaller than the length of
the
> > array. It still can be undefined, as for index 1 in this example:
Thanks,
This sure makes sense, but could you give a reference.
Bill
------------------------------
Date: Sat, 7 Dec 2002 10:20:56 +1100
From: "Tintin" <me@privacy.net>
Subject: Re: Getting a script to run properly
Message-Id: <asrbcp$t8q4v$1@ID-172104.news.dfncis.de>
"Lou Moran" <lou.moran@gellerandwind.com> wrote in message
news:lp82vu82n99193is6tbv008m5af8vtcfdr@4ax.com...
> On Fri, 6 Dec 2002 14:49:15 -0600, tadmc@augustmail.com (Tad
> McClellan) wrote:
>
> >> What have I forgotten to do?
> >
> >
> >Show us your shebang line, tell us where perl is installed on your
system.
>
> barney ellem ~/code $ more uptime.pl
>
> #! /usr/local/bin/perl
There's your problem. The she bang line has the be the on very first line.
Also, you should ensure there is no spaces on that line (is OK on some
systems, but not reliable).
------------------------------
Date: 7 Dec 2002 07:43:02 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: Getting a script to run properly
Message-Id: <ass8q6$eoj$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Uri Guttman:
>>>>>> "LM" == Lou Moran <lou.moran@gellerandwind.com> writes:
>
>
> LM> #! /usr/local/bin/perl
>
> why is there a space after the #!?
Well, why not? It never did any harm for me. :-)
Tassilo
--
$_=q!",}])(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus;})(rekcah{lrePbus;})(lreP{rehtonabus;})(rehtona{tsuJbus!;
$_=reverse;s/sub/(reverse"bus").chr(32)/xge;tr~\n~~d;eval;
------------------------------
Date: Sat, 07 Dec 2002 03:42:22 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Help Im losing faith! AoH key as a HoH key!
Message-Id: <3DF16D75.8010209@rochester.rr.com>
LazyPerfectionist wrote:
> Im sure Im bieng stupid!
> Ive read perldoc perltot perllol..etc but no luck..
> I know Im trying to put a ref of one arrayhash key as a key to another
> hash and I know I should deref but is there a another solution...
>
> my(@a_header) = (
> {'a' => '\b[A-Z]+\b'},
> {'b' => '\b\d{1,2}\b|\b100\b'}
> );
>
> this works but thats not what I want. I want to get rid of the
> my(@test)..!
> for (my($i)=0;$i<@a_header;$i++){
> my(@test)= keys %{$a_header[$i]};#####
> $h_data{$lineNo}->{$test[0]} =
> defined $values[$i]?$values[$i]:'';
> }#for
try:
$h_data{$lineNo}->{(keys %{$a_header[$i]})[0]} =
defined $values[$i]?$values[$i]:'';
--
Bob Walton
------------------------------
Date: Sat, 07 Dec 2002 07:39:44 GMT
From: "smackdab" <smackdab1@hotmail.com>
Subject: io::socket::inet / tcp question
Message-Id: <4BhI9.3777$jf7.256040@news2.west.cox.net>
I have a non-blocking client/server program. Since I do "stuff" while
waiting for
commands, I use $select->can_read(0) to see if I need to process network
commands.
So, will I always know if the remote connection died by using this
technique?
(I can only test on my local machine right now...which seems to work as
expected)
I have been reading Effective TCPIP Programming and it says that TCP is not
polled, but the author doesn't really address the can_read function. If the
client
exits cleanly or the OS cleans up after a program crash, I should always be
able to tell, right?
Same thing if the client machine loses power? Or does the server not get
notified and
have to timeout? (the book talkes about LONG timeouts of 9 minutes, etc...)
I am looking for a general technique to restart a client if it "crashes"
And am wondering
if I would have to use a different technique if the client and server are on
different machines...
thanks!
------------------------------
Date: Sat, 07 Dec 2002 00:28:19 GMT
From: "Greg Patnude" <GPatnude@adelphia.net>
Subject: Re: Is there a better way of doing this?
Message-Id: <DgbI9.50099$kO5.5669109@news1.news.adelphia.net>
my @EMPTYARRAY[100];
"Jimbo" <nobody@nobody.com> wrote in message
news:kUEH9.29890$vj1.7201862@amsnews02.chello.com...
> Create an empty array:
>
> my @empty;
> push ( @empty, undef ) foreach ( 1 .. 100 );
>
>
>
------------------------------
Date: Sat, 07 Dec 2002 02:11:34 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Is there a better way of doing this?
Message-Id: <3df1585b.8780782@news.erols.com>
"Greg Patnude" <GPatnude@adelphia.net> wrote:
: my @EMPTYARRAY[100];
You didn't even think to test that before posting, did you?
Top-posted, at that.
------------------------------
Date: Fri, 6 Dec 2002 20:16:03 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Is there a better way of doing this?
Message-Id: <slrnav2mf3.31l.tadmc@magna.augustmail.com>
[ text rearranged to follow usenet conventions ( a dead giveaway
that the answer is likely to be suspect as well...
]
Greg Patnude <GPatnude@adelphia.net> wrote:
> "Jimbo" <nobody@nobody.com> wrote in message
> news:kUEH9.29890$vj1.7201862@amsnews02.chello.com...
>> Create an empty array:
>>
>> my @empty;
>> push ( @empty, undef ) foreach ( 1 .. 100 );
>>
>>
> my @EMPTYARRAY[100];
That is not a "better" way of doing it.
It is not even _a_ way of doing it.
Posting non-Perl code is not helpful, please do not do that anymore.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 06 Dec 2002 23:19:27 GMT
From: bd <bdonlan@users.sf.net>
Subject: Re: Is there a kind of sleep or wait function?
Message-Id: <87brsa-8nq.ln@ID-151211.user.cis.dfn.de>
ZZT wrote:
> Hello,
>
> I would like to wait a while inside a script. Is this possible?
> If yes - how?
>
> thanks
Yes, there is a 'sleep' function. Please make at least a token effort to
find the information for yourself, the answer is in your subject.
--
What you don't know won't help you much either.
-- D. Bennett
------------------------------
Date: Fri, 06 Dec 2002 18:56:34 -0500
From: Alexander Stremitzer <stremitz@consultant.com>
Subject: Multi-dimensional hash question
Message-Id: <3DF13932.4080107@consultant.com>
I am trying to build a multi-diemnsional hash for an application. To
figure out how it works I wrote a small program to test it.However, I
can't get it to do what I want.
The hash should have a level1 key which each can have several level2
keys which holds data in form of a list.
My first print loop delivers the expected result when assigning the list
value directly. When going through the hash it does not work. What am I
doing wrong ?
Thanks for all your help,
Alex
pds:/db0_d/_alex/hup/pmc> cat yyy
#!/usr/local/bin/perl -w
use strict;
my %myhash = ();
my @array1 = ('mod1','organ1');
my @array2 = ('mod2','organ2');
my @array3 = ('mod3','organ3');
$myhash{'patid1'}{'acc1'} = @array1;
$myhash{'patid2'}{'acc2'} = @array2;
$myhash{'patid2'}{'acc3'} = @array3;
my @list = @array3;
for my $i ( 0 .. $#list ) {
print "without hash: $list[$i]\n";
}
my @list = $myhash{'patid2'}{'acc3'};
for my $i ( 0 .. $#list ) {
print "with hash: $list[$i]\n";
}
exit 0;
pds:/db0_d/_alex/hup/pmc> yyy
"my" variable @list masks earlier declaration in same scope at yyy line 21.
without hash: mod3
without hash: organ3
with hash: 2
pds:/db0_d/_alex/hup/pmc>
--
All man's miseries derive from not being able to sit quietly in a room alone. (Pascal)
------------------------------
Date: Sat, 07 Dec 2002 01:04:10 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Multi-dimensional hash question
Message-Id: <3DF14867.5090000@rochester.rr.com>
Alexander Stremitzer wrote:
...
> my %myhash = ();
>
> my @array1 = ('mod1','organ1');
...
> $myhash{'patid1'}{'acc1'} = @array1;
This is a scalar-context assignment. @array1 evaluated in a scalar
context gives 2, the number of elements in @array1. If you want to
assign the array to this hash key, you need to assign a reference to the
array. Try:
$myhash{'patid1'}{'acc1'} = [@array1]; #reference to anonymous array
or maybe
$myhash{'patid1'}{'acc1'} = \@array1; #reference to named array
Note that the latter "won't work" if you assign a new value to @array1.
The references already stored will continue to point to @array1, and
it will seem as if the old values of @array1 which you might have
thought were stored are gone, replaced by the new values. As indeed
that would be what would happen.
> without hash: mod3
> without hash: organ3
> with hash: 2
> pds:/db0_d/_alex/hup/pmc>
--
Bob Walton
------------------------------
Date: 6 Dec 2002 20:20:19 -0600
From: fishbowl@m0x0.conservatory.com ()
Subject: porting a routine which uses uint32_t
Message-Id: <3df15ae3_3@corp.newsgroups.com>
Greetings,
I am trying to port a routine that depends on the
behavior and precision of uint32_t. It's a hash
routine uses integer multiplication, xor, and modulo.
I believe the problem is that the value depends on
overflowing the precision of the int, which I believe
makes it very architecture-specific. Nevertheless, I
wish to duplicate the behavior in perl on the same platform.
To implement this in perl I've tried:
natve scalar types -- different overflow behavior from uint32_t
Math::BigInt -- does not overflow and thus gives me different results
-- while I was writing this, I thought of AND-ing with a BigInt(ffffffff')
to limit precision, will try that next...
unpack(pack) with various formats -- haven't found a combination that works
XS -- I still have the problem of representing a uint32_t for the return value.
Any suggestions would be greatly appreciated!
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
------------------------------
Date: Fri, 6 Dec 2002 22:39:21 -0700
From: "Rod" <palladium@spinn.net>
Subject: Re: read from standard-input within one command?
Message-Id: <uv33pojm9b1l70@corp.supernews.com>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnav1ean.3c7.tadmc@magna.augustmail.com...
> Bernard El-Hagin <bernard.el-hagin@DODGE_THISlido-tech.net> wrote:
>
>
> > I wonder what I'd look like in a Gestapo uniform.
> >
> >
> > Actually, my wife might go for that.
>
>
> Kinda puts a whole new spin on the phrase "use strict"...
Good thing i was using warnings on this one.
I thought maybe a use Getopt::Tiny was in order. :-)
or Someone really really enjoyed Hogan's Heros....
Cheers,
Rod
------------------------------
Date: Fri, 06 Dec 2002 18:33:12 -0700
From: Ron Reidy <rereidy@indra.com>
Subject: Re: syntax for DBI Perl commands ?
Message-Id: <3DF14FD8.A2C5DE2B@indra.com>
paul-new wrote:
>
> hi, i am a newbie to using DBI Perl.
>
> whats the syntax for DBI Perl commands ?
>
> for inserting into table ?
>
> for select from table ?
>
> for updating table ?
>
> for deletin from table ?
>
> can i use mysql or a text file ?
>
> thanks
Paul,
You have posted many questions to this group that could easily be
answered if you would do a little research yourself.
You **really** need to read about SQL, DBI, and propably Perl. I
suggest searching the web for SQL tutorials and reading the DBI and perl
docs on CPAN. Try writing some basic code, and if after this you are
stuck and have searched the FAQs that come with Perl and are also
available on CPAN, then post your specific questions.
--
Ron Reidy
Oracle DBA
------------------------------
Date: Fri, 6 Dec 2002 20:45:02 -0500
From: "a2liter" <crb@wedesigns.com>
Subject: Re: syntax for DBI Perl commands ?
Message-Id: <KjcI9.45811$bq3.15647@news.bellsouth.net>
"paul-new" <paul@nohotmail..com> wrote in message
news:3df0b8e9_2@news.tm.net.my...
> hi, i am a newbie to using DBI Perl.
>
> whats the syntax for DBI Perl commands ?
>
> for inserting into table ?
>
> for select from table ?
>
> for updating table ?
>
> for deletin from table ?
>
> can i use mysql or a text file ?
>
> thanks
>
>
Try this. I have found it to be very useful for MySQL help....
http://www.mysql.com/doc/en/index.html
a2liter
------------------------------
Date: Sat, 07 Dec 2002 03:57:04 GMT
From: "Bill Smith" <wksmith@optonline.net>
Subject: Re: syntax for DBI Perl commands ?
Message-Id: <kkeI9.4279$CU3.576@news4.srv.hcvlny.cv.net>
"paul-new" <paul@nohotmail..com> wrote in message
news:3df0b8e9_2@news.tm.net.my...
> hi, i am a newbie to using DBI Perl.
>
> whats the syntax for DBI Perl commands ?
>
> for inserting into table ?
>
> for select from table ?
>
> for updating table ?
>
> for deletin from table ?
>
> can i use mysql or a text file ?
>
> thanks
>
>
When I first started using DBI, I had difficulty understanding the
documentation because I was not familiar with Perl's object oriented
syntax. The documentation (perldoc DBI) is very good, but I did not
believe it. It should not be necessary, but it may help you to look
briefly at perldoc perlobj. All you need to know is how to recognize
the method calls when you see them in DBI documentation.
Good Luck,
Bill
------------------------------
Date: Fri, 06 Dec 2002 22:59:15 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Whee, a new JAPH
Message-Id: <3DF17213.19C927A3@earthlink.net>
Rafael Garcia-Suarez wrote:
>
> Benjamin Goldberg wrote in comp.lang.perl.misc :
> > The only thing that worries me in this is that I'm not sure
> > how bad it is to fiddle with $^H, instead of use re 'eval'.
>
> It's BAAAAAAAAAAAAAAAD.
> (OTOH Abigail already wrote a $^H-based japh. So...)
Actually, she wrote a number of them; look in:
http://www.cpan.org/misc/japh
Curiously, though, the only other japh besides mine which needed to use
re 'eval' was one by Mark-Jason Dominus; there are none by Abigail with
(?{}) or (??{}) in them, that I could find.
--
$..='(?:(?{local$^C=$^C|'.(1<<$_).'})|)'for+a..4;
$..='(?{print+substr"\n !,$^C,1 if $^C<26})(?!)';
$.=~s'!'haktrsreltanPJ,r coeueh"';BEGIN{${"\cH"}
|=(1<<21)}""=~$.;qw(Just another Perl hacker,\n);
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
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 4229
***************************************