[32039] in Perl-Users-Digest
Perl-Users Digest, Issue: 3303 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 1 03:09:43 2011
Date: Tue, 1 Mar 2011 00:09:07 -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 Tue, 1 Mar 2011 Volume: 11 Number: 3303
Today's topics:
Re: going from CPAN to RPM <smallpond@juno.com>
Re: Hash array with variable size? <cartercc@gmail.com>
Re: Hash array with variable size? <ela@yantai.org>
Re: matching '?' in a string ending with digits <cartercc@gmail.com>
Re: matching '?' in a string ending with digits <tadmc@seesig.invalid>
Re: matching '?' in a string ending with digits <cartercc@gmail.com>
Re: matching '?' in a string ending with digits <rameme@gmail.com>
Re: matching '?' in a string ending with digits <rameme@gmail.com>
Perl <marty.musatov@gmail.com>
Re: Perl <peter@makholm.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 28 Feb 2011 08:14:00 -0800 (PST)
From: smallpond <smallpond@juno.com>
Subject: Re: going from CPAN to RPM
Message-Id: <353fbea9-a226-4e47-a2dc-d5ffd7faac51@z3g2000prz.googlegroups.com>
On Feb 27, 7:05=A0pm, Art Werschulz <a...@dsm.fordham.edu> wrote:
> Hi all.
>
> Although we have used the CPAN shell to install Perl modules on our
> Linux systems, we would like to use the RPM versions of same instead.
> This means that we need to find out which Perl modules were installed
> via the CPAN shell, nuke same, and then install the RPM versions (say,
> via yum).
>
> How can we find out which Perl modules were installed via the CPAN
> shell?
>
rpm -qf <filename>
returns the name of the rpm to which that file belongs.
If it wasn't installed by rpm, it returns an error.
------------------------------
Date: Mon, 28 Feb 2011 07:24:47 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: Hash array with variable size?
Message-Id: <c93f0db3-3307-4ad8-8155-023555bdd6f2@i39g2000prd.googlegroups.com>
On Feb 28, 4:37=A0pm, "ela" <e...@yantai.org> wrote:
> 2794438 dnaA-1 =A0chromosomal replication initiator protein DnaA =A027949=
71 dnaN
> DNA polymerase III subunit beta
> 2794438 dnaA-1 =A0chromosomal replication initiator protein DnaA =A027949=
72 gyrB
> DNA gyrase subunit B
> 2794438 dnaA-1 =A0chromosomal replication initiator protein DnaA =A027949=
73 gyrA
> DNA gyrase subunit A
>
> the first cell of each row is to look up, i.e. 2794438 in the above examp=
le,
> and to print something like:
>
> dnaA-1 dnaN
> dnaA-1 gyrB
> dnaA-1 gyrA
You seem to have two tasks: (1) process and normalize the data, and
(2) analyze the results.
(1) It strikes me that you should use line oriented logic. You want
the first element (a seven digit number), the second element, and the
element between a seven digit number and the string 'DNA'. Deconstruct
the string using a RE, and use a hash of hashes, like this:
while (<DATA>)
{
my ($key1, $key2, $value) =3D ...deconstruction RE ...;
$datahash{$key1}{$key2} =3D $value;
}
(2) Having your data in a hash of hashes will greatly ease your
analysis. Use Data::Dumper to print your data structure to see what it
looks like.
If the size of the input file is a problem, no programming solution
will solve it. You will need either to reduce the amount of your input
data, or increase the size of your memory or storage or both.
CC.
------------------------------
Date: Tue, 1 Mar 2011 14:18:21 -0800
From: "ela" <ela@yantai.org>
Subject: Re: Hash array with variable size?
Message-Id: <iki31b$325$1@ijustice.itsc.cuhk.edu.hk>
"ccc31807" <cartercc@gmail.com> wrote in message
news:c93f0db3-3307-4ad8-8155-023555bdd6f2@i39g2000prd.googlegroups.com...
On Feb 28, 4:37 pm, "ela" <e...@yantai.org> wrote:
> 2794438 dnaA-1 chromosomal replication initiator protein DnaA 2794971 dnaN
> DNA polymerase III subunit beta
> 2794438 dnaA-1 chromosomal replication initiator protein DnaA 2794972 gyrB
> DNA gyrase subunit B
> 2794438 dnaA-1 chromosomal replication initiator protein DnaA 2794973 gyrA
> DNA gyrase subunit A
>
> the first cell of each row is to look up, i.e. 2794438 in the above
> example,
> and to print something like:
>
> dnaA-1 dnaN
> dnaA-1 gyrB
> dnaA-1 gyrA
You seem to have two tasks: (1) process and normalize the data, and
(2) analyze the results.
(1) It strikes me that you should use line oriented logic. You want
the first element (a seven digit number), the second element, and the
element between a seven digit number and the string 'DNA'. Deconstruct
the string using a RE, and use a hash of hashes, like this:
while (<DATA>)
{
my ($key1, $key2, $value) = ...deconstruction RE ...;
$datahash{$key1}{$key2} = $value;
}
(2) Having your data in a hash of hashes will greatly ease your
analysis. Use Data::Dumper to print your data structure to see what it
looks like.
If the size of the input file is a problem, no programming solution
will solve it. You will need either to reduce the amount of your input
data, or increase the size of your memory or storage or both.
CC.
Thanks both Jürgen Exner & CC. In fact my description was poor and CC seems
to be closer to what I have to do. Please let me re-define my problem again:
Given:
1) Query data (about 100,000 rows) in the following format:
2794438
20156
2794972
1234
...
2) Database data (about 10 million rows) in the following format (delimited
by tab):
2794438 dnaA-1 chromosomal replication initiator protein DnaA 2794971 dnaN
DNA polymerase III subunit beta
2794438 dnaA-1 chromosomal replication initiator protein DnaA 2794972 gyrB
DNA gyrase subunit B
2794438 dnaA-1 chromosomal replication initiator protein DnaA 2794973 gyrA
DNA gyrase subunit A
So I'm using 2 for loops to retrieve all the relations (Jürgen Exner's
advice on database usage is good but then I have to spend another month to
learn :-( ),
I readily notice that if I can do something like what CC suggested, e.g.
if exists a_hash[2794438][20156]
then it is much better (faster) than traversing the array 2794438 (e.g. by
foreach) and check whether the 2nd key 20156 exists. It seems that during
the hash building proecess, I should use hash of hash, e.g.
my %hoh;
$hoh{$key1}{$key2}=1;
then later I can use the 2 for loops and check is fine then.
Thanks again, the friends all over the world!
------------------------------
Date: Mon, 28 Feb 2011 07:09:48 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: matching '?' in a string ending with digits
Message-Id: <9fb619c6-8122-4d5c-8177-eb2e6266670d@o21g2000prh.googlegroups.com>
On Feb 26, 3:42=A0am, "ReMo..." <ram...@gmail.com> wrote:
> In the above, the nondigits represent arbitrary text that digits are
> added to for a multi-array sort in a module I'm making, because there
> may be otherwise-identical text items.
There's a difference between testing for a match, and testing for
equality. If you want to test for equality, use 'eq' for strings and
'=3D=3D' for numerical values. REs are great, but they aren't the
universal tool to solve every problem.
If you want to test for the equality of two strings, do that -- don't
try to match them. If you want to test whether a string contains the
exact copy of a substring, use the appropriate functions, like
index().
Obviously, what you do in your script depends on what you want done in
your logic. One thing you might want to consider is substituting
something for every non-word character, or everything that doesn't
match [0-9a-zA-Z]. In my job, I have a problem with extraneous
apostrophes (using CSV, which uses REs indirectly) and have learned to
replace the apostrophes like this:
while (<INPUT>)
{
next unless /\w/;
chomp;
s/'/\\/'g;
# continue processing
}
CC
------------------------------
Date: Mon, 28 Feb 2011 14:54:09 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: matching '?' in a string ending with digits
Message-Id: <slrnimo2ho.kjc.tadmc@tadbox.sbcglobal.net>
ccc31807 <cartercc@gmail.com> wrote:
> replace the apostrophes like this:
>
> while (<INPUT>)
> {
> next unless /\w/;
> chomp;
> s/'/\\/'g;
> # continue processing
> }
perl -we "s/'/\\/'g;"
Substitution replacement not terminated at -e line 1.
...
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Mon, 28 Feb 2011 13:13:35 -0800 (PST)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: matching '?' in a string ending with digits
Message-Id: <4236f132-4918-452e-95e3-98f658b6f444@o39g2000prb.googlegroups.com>
On Feb 28, 3:54=A0pm, Tad McClellan <ta...@seesig.invalid> wrote:
> =A0 =A0 perl -we "s/'/\\/'g;"
>
> =A0 =A0 Substitution replacement not terminated at -e line 1.
Yes, thanks, my mistake. CC.
------------------------------
Date: Tue, 1 Mar 2011 04:05:24 +0000 (UTC)
From: "ReMo..." <rameme@gmail.com>
Subject: Re: matching '?' in a string ending with digits
Message-Id: <ikhra4$k87$1@news.eternal-september.org>
On 2011-02-26, C.DeRykus <derykus@gmail.com> wrote:
> On Feb 26, 12:42?am, "ReMo..." <ram...@gmail.com> wrote:
>> #!/usr/bin/perl
>>
>> use strict;
>> use warnings;
>>
>> my @arr = ('third1000','third1000','third?1000','1000third?','third{}1000');
>> for my $item (@arr) {
>> ? ? my $targ = $item;
>> ? ? print "$targ and $item ";
>> ? ? print "do not " if ($item !~ /$targ/);
>> ? ? print "match\n"
>>
>> }
>>
>> The output is:
>> third1000 and third1000 match
>> third1000 and third1000 match
>> third?1000 and third?1000 do not match << I don't understand this
>> 1000third? and 1000third? match
>> third{}1000 and third{}1000 match
>>
>> In the above, the nondigits represent arbitrary text that digits are
>> added to for a multi-array sort in a module I'm making, because there
>> may be otherwise-identical text items.
>>
>> /\Q...\E/ seems to make it go away, but then two characters ('$' and '@')
>> would apparently need to be accounted for.
>>
>> So my question is, what other characters will fail to match in a string
>> ending with digits? ?I assume there are more clues in perlre and perlops,
>> but I can't find them. ?I've got to be missing something really elementary
>> here.
>>
>
>
> See perldoc perlretut for a quick intro about meta-
> characters. Various metacharacters will cause the
> regex to fail as mentioned.
I wish I'd done that before.
> One problem is that there must be a literal '?' in
> the regex in order to match the '?' in the string
> being matched. Since '?' is a regex metacharacter
> with special meaning to the regex compilation and
> not a literal '?', the match would fail.
>
> The 're' pragma can be helpful in seeing what
> happens:
>
> perl -Mre=debug -wle "print 'not'
> if 'third?1000' !~ /third?1000/"
>
> Compiling REx "third?1000"
> Final program:
> 1: EXACT <thir> (3)
> 3: CURLY {0,1} (7)
> 5: EXACT <d> (0)
> 7: EXACT <1000> (9)
> 9: END (0)
> anchored "thir" at 0 floating "1000" at 4..5 (checking
> floating) minlen 8
> Guessing start of match in sv for REx "third?1000"
> against "third?1000"
> Found floating substr "1000" at offset 6...
> Contradicts anchored substr "thir", giving up...
> Match rejected by optimizer
>
> As it turns out though, the debug looks to me as
> if the compilation fails for another reason when
> the optimizer determines "1000" will occurs at
> offset 4 or 5 in the pattern which won't match its
> position at offset 6 in the string being matched.
Using debugging would have definitely pointed me in the right
direction.
It starts giving an exception one character previous to the
metacharacter... I think it's checking "d". Then 4..5 may refer
to the boundary between "d" and "?".
------------------------------
Date: Tue, 1 Mar 2011 04:12:12 +0000 (UTC)
From: "ReMo..." <rameme@gmail.com>
Subject: Re: matching '?' in a string ending with digits
Message-Id: <ikhrmr$k87$2@news.eternal-september.org>
On 2011-02-28, ccc31807 <cartercc@gmail.com> wrote:
> On Feb 26, 3:42?am, "ReMo..." <ram...@gmail.com> wrote:
>> In the above, the nondigits represent arbitrary text that digits are
>> added to for a multi-array sort in a module I'm making, because there
>> may be otherwise-identical text items.
>
> There's a difference between testing for a match, and testing for
> equality. If you want to test for equality, use 'eq' for strings and
> '==' for numerical values. REs are great, but they aren't the
> universal tool to solve every problem.
>
> If you want to test for the equality of two strings, do that -- don't
> try to match them. If you want to test whether a string contains the
> exact copy of a substring, use the appropriate functions, like
> index().
>
> Obviously, what you do in your script depends on what you want done in
> your logic. One thing you might want to consider is substituting
> something for every non-word character, or everything that doesn't
> match [0-9a-zA-Z]. In my job, I have a problem with extraneous
> apostrophes (using CSV, which uses REs indirectly) and have learned to
> replace the apostrophes like this:
>
> while (<INPUT>)
> {
> next unless /\w/;
> chomp;
> s/'/\\/'g;
> # continue processing
> }
>
> CC
Something like that was my backup plan, tho I would have used
3-character strings.
------------------------------
Date: Mon, 28 Feb 2011 16:38:41 -0800 (PST)
From: CS Student <marty.musatov@gmail.com>
Subject: Perl
Message-Id: <4ee29810-13d4-4726-aa72-36865860d626@l14g2000pre.googlegroups.com>
What does this mean?
perl -e 'while(1){ if($x = not fork){ print $x; } else { print " "; }
exit if int rand(1.03); }'
1 1 1 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111
1111111111 1
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111 1 1 11 1 1 1 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111
1 1 1 1 1 1 1 1 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111 1
1 1 1 1 1 1 1 1 11
11111111111111111111111111111 1 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111 1 1 1 1 1 1
1 1 11 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1 1
1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111 1111111111111111111111111111111
11111111111111111111111111111111
1111111111111111111111111111111 111111111111111111111111111111
11111111111111111111111111111
1111111111111111111111111111 111111111111111111111111111
11111111111111111111111111 1111111111111111111111111
11111111111111111111111111111111 1111111111111111111111111111111
111111111111111111111111111111
1111111111111111111111111111111 111111111111111111111111111111
11111111111111111111111111111
1111111111111111111111111111 111111111111111111111111111
11111111111111111111111111 1111111111111111111111111
111111111111111111111111 1111111111111111111111111111111
111111111111111111111111111111 11111111111111111111111111111
111111111111111111111111111111 11111111111111111111111111111
1111111111111111111111111111 111111111111111111111111111
11111111111111111111111111 1111111111111111111111111
111111111111111111111111 11111111111111111111111
111111111111111111111111111111 11111111111111111111111111111
1111111111111111111111111111 11111111111111111111111111111
1111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111
1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111 1 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1
1111111111111111111111111111111111111111111111 1
111111111111111111111111111111111 1 111111111111111111111 11111111111
1111111111 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111
1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111 1
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111
1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111
1 1 1
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
1 1
111111111111111111111111111111 1
11111111111111111111111111111111111111111111111111111111111 1
1 1 11
1 11111111111111 1 11 111 1 1111111111111111 1 1 11 1 11 1 11
111 111 111 1111 11111111111111111111
11111111111 111111111111 11111 11111111111111
------------------------------
Date: Tue, 01 Mar 2011 07:51:26 +0100
From: Peter Makholm <peter@makholm.net>
Subject: Re: Perl
Message-Id: <87oc5vwcy9.fsf@vps1.hacking.dk>
CS Student <marty.musatov@gmail.com> writes:
> What does this mean?
>
> perl -e 'while(1){ if($x = not fork){ print $x; } else { print " "; }
> exit if int rand(1.03); }'
Which part do you not understand?
As a CS Student you ought to be able to decipher this after reading
'perldoc perlsyn' and the documentation for the fork, print, int, and
rand functions in 'perldoc perlfunc'.
Either just use 'perldoc perlsyn' from the command line or use the
web interface at http://perldoc.perl.org/perlsyn.html
//Makholm
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 V11 Issue 3303
***************************************