[13066] in Perl-Users-Digest
Perl-Users Digest, Issue: 476 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 12 03:09:08 1999
Date: Thu, 12 Aug 1999 00:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 12 Aug 1999 Volume: 9 Number: 476
Today's topics:
Re: Dereferencing anon hash <uri@sysarch.com>
Re: Getting perl to accept a flat table file (Abigail)
Re: Getting perl to accept a flat table file (Abigail)
Re: Illegal division by zero when testing for a directo (Abigail)
Lexical Warnings (was Re: is our reese the author of my <dgris@moiraine.dimensional.com>
Re: Looking for Reviews - Perl (Abigail)
Re: My attempt at perl poetry (Martien Verbruggen)
Re: My attempt at perl poetry (Andrew Johnson)
Re: My attempt at perl poetry <dan@purenud.com>
Re: Perl is eating up my memory (Abigail)
Re: Perl Novice needs advice (Abigail)
Re: Regexp newbie (Abigail)
Re: Regexp newbie (Abigail)
Re: Reset .. ie clear out a hash array (Martien Verbruggen)
Re: Reset .. ie clear out a hash array <uri@sysarch.com>
Re: searching complex data structure (Abigail)
Re: Stripping quotes only from HTML tags <resource@ERASEjps.net>
Re: suggestions for CRAP <uri@sysarch.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Aug 1999 02:38:39 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Dereferencing anon hash
Message-Id: <x7pv0t7bbk.fsf@home.sysarch.com>
how many times do we have to tell you, DON'T QUOTE THE ENTIRE PREVIOUS
POST!!!!
this is as bad as jeopardy quoting. if you are commenting about a small
amount of the original post, DELETE THE REST. and INTERSPERSE YOUR
COMMENTS WITH THE QUOTED TEXT.
i am shouting since that is the only way i know to get experts to
listen.
there seems to be cabal of people behind this web site and none of them
realize or know that they are being gatewayed to this group. they have
this USENET customer id which seems to get some posts from here into
their pay for answers site. i think this is to drum up customers. but
the expert quality has been proven very lacking.
and the losuy quoting is because of the stupid web interface which
probably just post the quote and the answer and doesn't allow
editing. on top of that it mangles line wraps in both directions.
this is getting very annoying very fast.
i may actually killfile something. i do mark win32 subjects and skip them.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 12 Aug 1999 01:27:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Getting perl to accept a flat table file
Message-Id: <slrn7r4qal.d88.abigail@alexandra.delanet.com>
Paul Foran (Paul.Foran@analog.com) wrote on MMCLXXI September MCMXCIII in
<URL:news:37B13280.B43298B7@analog.com>:
--
-- Can somebody tell me how to get perl to accept a comma delimited txt
-- file and parse it contents.
Chocolate. Perl is a sucker for chocolate. It will even accept a comma
delimited text file, just to get more chocolate.
Abigail
--
sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
$y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 01:30:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Getting perl to accept a flat table file
Message-Id: <slrn7r4qeq.d88.abigail@alexandra.delanet.com>
Paul Foran (Paul.Foran@analog.com) wrote on MMCLXXI September MCMXCIII in
<URL:news:37B1703D.3483F276@analog.com>:
## Andreas Fehr wrote:
##
## > On Wed, 11 Aug 1999 09:21:20 +0100, Paul Foran <Paul.Foran@analog.com>
## > wrote:
## >
## > >Can somebody tell me how to get perl to accept a comma delimited txt
## > >file and parse it contents.
## >
## > Yes, write some Perl code and run it with the filename as parameter.
##
## How can I do this exactly???
$ cat > fluffy.pl <<EOT
Your Perl code here.
EOT
$ perl -w fluffy.pl comma_delimited_txt_file
Output
$
HTH. HAND.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 01:32:54 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Illegal division by zero when testing for a directory??
Message-Id: <slrn7r4qk4.d88.abigail@alexandra.delanet.com>
Greg Miller (gregjm@sr.hp.com) wrote on MMCLXX September MCMXCIII in
<URL:news:37B052ED.82073C25@sr.hp.com>:
@@ Hi,
@@
@@ This morning I came in to see that my nightly tests reported
@@ the following error:
@@
@@ Illegal division by zero at runsession.pl line 968, chunk 1.
@@
@@ Hmmm....Here is the line that it choked on:
@@ ------------------------------------------
@@
@@ if (-d "$LOC_DIR/actual/$PLATFORM/logs")
@@ {$LOGSDIR="$LOC_DIR/actual/$PLATFORM/logs";}
@@
@@
@@ How in the heck could this produce the division by zero?..Must be some
@@ kind of NFS issue?...
You probably have used a regex somewhere else, where you forgot
one of the slashes.
Abigail
--
$" = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%_ = (Just => another => Perl => Hacker); &{%_};
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 00:18:25 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Lexical Warnings (was Re: is our reese the author of mysql book?)
Message-Id: <m3lnbh1pzi.fsf_-_@moiraine.dimensional.com>
lt lindley <ltl@rgsun40.viasystems.com> writes:
> But from what I read about the future lexical warnings, we will
> someday be able to have our cake and eat it too. (As Uri also
> pointed out).
Has anyone played around to see what effect combining
C<use warning qw(FATAL io)> and #!/usr/bin/perl -X
has?
(I would, but I'm getting over a case of the martian death flu and
need to get to bed so I can catch an early morning plane.)
dgris
--
A hacker is a machine that turns caffeine into code.
------------------------------
Date: 12 Aug 1999 01:35:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Looking for Reviews - Perl
Message-Id: <slrn7r4qon.d88.abigail@alexandra.delanet.com>
Jody Fedor (JFedor@datacom-css.com) wrote on MMCLXXI September MCMXCIII
in <URL:news:7os9mu$nig$1@plonk.apk.net>:
^^
^^ I'm looking for book reviews on all O'Reilly books. Author Comments are
^^ invited too!
Sure. Send me a reviewers copy.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 12 Aug 1999 06:17:41 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: My attempt at perl poetry
Message-Id: <9Gts3.299$gi1.50707@nsw.nnrp.telstra.net>
In article <fpss3.2233$lL2.228527@typ12.nn.bcandid.com>,
"Dan" <dan@purenud.com> writes:
> one thing I've learned is always have fun with your code --
# cat > foo
SIT: foreach $hit (@toilet) {
if(exists(fork())) { chomp($hit) and die }
eval { sqrt($hit) };
if ( glob($hit) { do 'dump' }
else { unpack "c", $hit }
warn if log; split; sleep; wait; redo SIT;
}
# perl -wc foo
exists operator argument is not a HASH element at foo line 2.
:)
Martien
--
Martien Verbruggen |
Interactive Media Division | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd. | inexactitude.
NSW, Australia |
------------------------------
Date: Thu, 12 Aug 1999 06:17:53 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: My attempt at perl poetry
Message-Id: <lGts3.1254$dr6.27792@news1.rdc2.on.home.com>
In article <fpss3.2233$lL2.228527@typ12.nn.bcandid.com>,
Dan <dan@purenud.com> wrote:
! one thing I've learned is always have fun with your code --
!
!
! SIT: foreach $hit (@toilet) {
! if(exists(fork())) { chomp($hit) and die }
! eval { sqrt($hit) };
! if ( glob($hit) { do 'dump' }
! else { unpack "c", $hit }
! warn if log; split; sleep; wait; redo SIT;
! }
potty mouth!
andrew
------------------------------
Date: Thu, 12 Aug 1999 00:40:25 -0600
From: "Dan" <dan@purenud.com>
Subject: Re: My attempt at perl poetry
Message-Id: <9Zts3.2309$lL2.238304@typ12.nn.bcandid.com>
You'll notice I picked that up about 2 minutes after I posted =)
Martien Verbruggen <mgjv@comdyn.com.au> wrote in message
news:9Gts3.299$gi1.50707@nsw.nnrp.telstra.net...
> In article <fpss3.2233$lL2.228527@typ12.nn.bcandid.com>,
> "Dan" <dan@purenud.com> writes:
> > one thing I've learned is always have fun with your code --
>
> # cat > foo
> SIT: foreach $hit (@toilet) {
> if(exists(fork())) { chomp($hit) and die }
> eval { sqrt($hit) };
> if ( glob($hit) { do 'dump' }
> else { unpack "c", $hit }
> warn if log; split; sleep; wait; redo SIT;
> }
> # perl -wc foo
> exists operator argument is not a HASH element at foo line 2.
>
> :)
>
> Martien
> --
> Martien Verbruggen |
> Interactive Media Division | That's not a lie, it's a
terminological
> Commercial Dynamics Pty. Ltd. | inexactitude.
> NSW, Australia |
------------------------------
Date: 12 Aug 1999 01:44:09 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl is eating up my memory
Message-Id: <slrn7r4r96.d88.abigail@alexandra.delanet.com>
Chao Fang (cfang@nwu.edu) wrote on MMCLXXI September MCMXCIII in
<URL:news:7os9or$2di@news.acns.nwu.edu>:
"" I used a array to hold 8M of one digit number. However Perl used up to 240M
"" of memory and the process is hang up finally.
That's about 30 bytes per scalar.... Given what's stored associated with
a scalar, that's not that bad!
"" I run the script on a SUN Ultra5 with 128M and Solaris. I use 'top' command
"" to watch how much memory is used.
I'm a bit surprised. I've a Sun Ultra5 as well, with 128M RAM, and
Solaris 2.7. But it happely munches on even if a process uses 240 Mb
of memory. Perhaps you want to increase your swap space?
"" The script is quite simple and the array is the only main data structure.
"" You can try by just filling enough data in an array and watch what is
"" happening.
""
"" Is the answer that Perl is not suitable to process great amount of data?
Well, yes and no. Perl is very well suited to process large amount of
data; given the appropriate processing techniques. By far the best
technique for processing large amounts of data is working on a stream;
you read in a piece of data, process it, write it, and then you take
the next piece. That of course isn't alway possible.
Ask yourself, do you really need 8000000 single digits all at once?
Can you use a streamline? Can you pack the digits in a more suitable
structure? (pack/unpack, vec, strings, files)? Having lots and lots of
little units isn't Perl strongest point; it'll use quite some memory.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 01:45:57 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Perl Novice needs advice
Message-Id: <slrn7r4rci.d88.abigail@alexandra.delanet.com>
Waiman Mak (w.mak@cwcom.net) wrote on MMCLXXI September MCMXCIII in
<URL:news:BWks3.3341$Yu4.120917@news2-hme0.mcmail.com>:
##
## Is it possible to configure my own PC as a WEB server so that I can create
## and test my own CGI/Perl scripts? I would like to move over to more
## technical WEB development, rather than just front end WEB (graphical/static
## HTML) development, but I can't do this without having a server to test
## anything on.
Yes. But how is beyond the scope of this group.
## I'm not a regular on this NG so any information would be more appreciated if
## sent to my e-mail address: w.mak@cwcom.net
Oh well. Then you aren't really interested in the answer, are you?
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 01:56:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Regexp newbie
Message-Id: <slrn7r4s05.d88.abigail@alexandra.delanet.com>
Erich Seifert (erich.seifert@dachau.baynet.de) wrote on MMCLXXI September
MCMXCIII in <URL:news:37B16B08.2C61206B@dachau.baynet.de>:
$$
$$
$$ My problem: I'm not very familiar with regular expressions, but I want
$$ to replace each of the leading spaces in a string with another string.
$$ Who can help me?
You can!
Yes. It's amazing, but true! For only 5 monthly payments of $29.94 (yes,
we are cheaper than Python, who charges you the incredible $29.95)
you too can be the proud owner of the Perl manual! Starting 6 weeks
after receiving the initial you will receive your first pod page!
And then every week another pod! And if you don't like the first pod,
send it back and we will stop sending you more pods! No questions asked!
But you don't want to send back the pod! You will love the pod! The kids
will love the pod! The kids will ask you "when is the new pod coming?"!
If you don't want your kids to grow pimples and do bad in school, you
can give them pods! Be a responsible parent! And parents love the pods
too! For the kids, there is much to learn about ``reverse'' and ``chomp'',
and for the parents, there are ``Threads'' and ``Regular Expressions''!
Don't delay! Order now!
Please call our toll free number: 1-800-POD-PERL, 24h/day!
Abigail
--
This product is Y2K safe.
Void where prohibited, except in Wisconsin.
Contains small particles; keep away from potted plants.
PODs CONTAIN PARTICLES THAT ATTRACT EVERY OTHER PARTICLE IN THE UNIVERSE.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 02:03:49 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Regexp newbie
Message-Id: <slrn7r4se3.d88.abigail@alexandra.delanet.com>
Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLXXI September
MCMXCIII in <URL:news:7os9ig$p79$1@lublin.zrz.tu-berlin.de>:
''
'' Since my perl tells me it can't do variable length lookbehinds, I
'' came up with the following horror:
''
'' my $x = ' 1 2 3 ';
'' $x =~ s/((?:string!)*) /$1string!/ while $x =~ /^(?:string!)* /g;
''
'' There must be a better way.
join "" => map {!$i && / / ? $string : ++ $i && $_} split // => $x;
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 12 Aug 1999 06:27:13 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <5Pts3.300$gi1.50707@nsw.nnrp.telstra.net>
In article <828qx@questionexchange.com>,
QuestionExchange <USENET@questionexchange.com> writes:
[no attribution[
[a full quote of the message, including signature, which was too long
in the first place]
[nothing original]
[a signature that is more than 80 characters wide]
You are really outdoing yourself here. I am now convinced that you do
it on purpose.
--
Martien Verbruggen |
Interactive Media Division |
Commercial Dynamics Pty. Ltd. | Can't say that it is, 'cause it ain't.
NSW, Australia |
------------------------------
Date: 12 Aug 1999 02:45:48 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <x7lnbh7azn.fsf@home.sysarch.com>
>>>>> "MV" == Martien Verbruggen <mgjv@comdyn.com.au> writes:
MV> In article <828qx@questionexchange.com>,
MV> QuestionExchange <USENET@questionexchange.com> writes:
MV> [no attribution[
MV> [a full quote of the message, including signature, which was too long
MV> in the first place]
MV> [nothing original]
MV> [a signature that is more than 80 characters wide]
MV> You are really outdoing yourself here. I am now convinced that you do
MV> it on purpose.
check out my recent post to these jerks. they are a web front end which
is why the quoting is so mangled.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 12 Aug 1999 01:22:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: searching complex data structure
Message-Id: <slrn7r4q0b.d88.abigail@alexandra.delanet.com>
Joe Kline (Joe.Kline@sdrc.com) wrote on MMCLXXI September MCMXCIII in
<URL:news:37B12BEB.C8262476@sdrc.com>:
,, I am searching a complex data structure (hohohohol).
,,
,, The key structure that I've pared down my search looks something like
,, this.
,,
,, / \ / \
,, | alpha | | apples |
,, | beta | / \ / \ | oranges |
,, | gamma |-> | A | -> | dog | -> | bananas |-> [list of stuff]
,, | . | | B | \ / | . |
,, | . | \ / | . |
,, \ / \ /
,,
,, V W X Y Z
,,
,,
,, Where V is all possible keys at that level.
,, W only 2 possible keys
,, X only 1 possible key
,, Y is all possible keys at that level
,, Z all elements of the list
,,
,, call the structure %stuff
,,
,, I am looking for a specific Y and Z (my search criteria).
,,
,, I can only think of 2 ways to search this.
Well, I am not sure what exactly you want, but having only two
nested loops seemed rather odd to me.
But here is a recursive function, which could use some comments:
#!/opt/perl/bin/perl -w
use strict;
sub find;
sub find {
my ($dst, $criteria) = @_;
# Some trivial sanity checking.
die "Illegal first argument to find.\n" unless defined $dst;
if ($criteria && ref $criteria ne 'ARRAY') {
die "Illegal second argument to find.\n";
}
if (!$criteria || !@$criteria) {
# Bottom of recursion reached.
# Return answer.
if (ref $dst eq 'ARRAY') {
return @$dst;
}
elsif (ref $dst eq 'HASH') {
return %$dst; # Or perhaps keys, or values?
}
return $dst;
}
my ($this_criterium, @other_criteria) = @$criteria;
# Special case, $this_criterium is undefined.
unless (defined $this_criterium) {
if (ref $dst eq 'ARRAY') {
return map {find $_, \@other_criteria} @$dst;
}
elsif (ref $dst eq 'HASH') {
return map {find ($_, \@other_criteria)} values %$dst;
}
elsif (!@other_criteria) {
# The criteria list is exhausted. Return whatever we have.
return $dst;
}
else {
# Give up. More criteria to go, but no arrayref or hashref.
die "$dst is neither an arrayref nor a hashref\n";
}
}
# Recursion.
if (ref $dst eq 'ARRAY') {
return map {find $_, \@other_criteria}
@{$dst} [grep {$_ >= $[ && $_ <= $#{$dst}} @$this_criterium];
}
elsif (ref $dst eq 'HASH') {
return map {find $_, \@other_criteria}
@{$dst} {grep {exists $dst -> {$_}} @$this_criterium};
}
else {
# Cannot do anything, unless we have an arrayref or a hashref.
die "$dst is neither an arrayref nor a hashref\n";
}
}
# Create a large, complex datastructure.
my $dst;
foreach my $greek (qw /alpha beta gamma delta epsilon/) {
foreach my $letter (split // => "ABCD") {
foreach my $animal (qw /dog cat horse/) {
foreach my $fruit (qw /apple banana kiwi orange grape/) {
$dst -> {$greek} {$letter} {$animal} {$fruit} = [
map {join ":" => $_, $greek, $letter, $animal, $fruit} 1..5
];
}
}
}
}
# Return all values for which
my @results = find $dst, [undef, # the first level can be anything,
[qw /A B/], # the second level is 'A' or 'B',
[qw /dog/], # the third level is 'dog',
undef]; # the fourth level can be anything.
foreach (@results) {
print "$_\n";
}
Abigail
--
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Wed, 11 Aug 1999 23:28:54 -0700
From: Warren Bell <resource@ERASEjps.net>
Subject: Re: Stripping quotes only from HTML tags
Message-Id: <37B269A6.41D761F@ERASEjps.net>
Warren Bell writes ..
>>I have a messageboard script that I want to strip the quotes out of
>>anything within HTML tags that is entered in the text area. If a quote>is entered as text like: try the command "foo -a" it woulden't get
>>stripped. But anything in between < and > gets the quotes stripped from>it.
>
>>Is there a way to do this with a simple substitution like:
>
>>$message =~ s/?/?\g;
>well you're a real "roll over and scratch my tummy please" guy aren't >you .. one day all that "read the documentation"
>advice will slip through the cracks into your brain
And your the type of guy who spends his time on newsgroups waiting for
opertunities to try and talk trash to people instead of helping out. I
guess that makes you feel important or somthing.
For your information, maybe I don't have time to learn Perl. Maybe I'm
busy with other things and thought I could come into a newsgroup to get
a quick answer. I'm sorry, I didnt know there were prerequisites for
posting. When someone comes to an HTML newsgroup I don't tell them to
buy a book and figure it out for themselves. It's called help, fool.
>*plonk*
Sorry again, I dont understand nerd lingo.
--
jason - elephant@squirrelgroup.com -
--
####### Remove ERASE to reply #######
------------------------------
Date: 12 Aug 1999 02:23:49 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: suggestions for CRAP
Message-Id: <x7u2q57c0a.fsf@home.sysarch.com>
>>>>> "mmw" == matthew michael wright <mmwright@ux12.cso.uiuc.edu> writes:
mmw> Abigail <abigail@delanet.com> wrote: : And although IANAL, I can
mmw> easily imagine that if Matt Wright gets ticked : off, a bunch of
mmw> lawyers will have a field day.
mmw> Nah, it takes a lot to tick me off. Even the oh-so-nice musings
mmw> of purl on topics related to my name and sites don't upset me.
mmw> I like the project's goal and think that it will be good for both
mmw> users of my stuf--errr... CRAP, and myself.
amazing. he actually has the chutzpah to show his face here, where he is
cursed on a daily basis, where his infected code gets trashed because
all the newbies can't get it to work. remember, he is the god of the
cargo cult programmers, who keep passing on the religious totems of bad
cgi parsing, backwhacked quotes, local, and no modules or references.
well, if we get the CRAP and good cgi sites up and running, his
cgi-resources could become a desert. and yet he gives us his blessing.
matt: "perl been berry berry good to me"
maybe he will attend monterey and someone (me?) could throw a beer in
his face like in the ending of the caine mutiny! to the real cause of
the ruination of c.l.p.misc, matt wright!
so full steam ahead, says old yellowstain, and damn the storm! we will
make a site full of good cgi to be a lighthouse to guide the web through
the dark crashing waves of matt's code and out into the calm port where
larry intended perl to anchor.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
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 476
*************************************