[San-Diego-pm] Perl Meeting on Monday, May 9th
Randal L. Schwartz
merlyn at stonehenge.com
Tue May 10 12:16:33 PDT 2005
>>>>> "Menolly" == Menolly <menolly at mib.org> writes:
Menolly> my %taken;
Menolly> @taken{map $_->[0], @{$rd2->{'sth'}->fetchall_arrayref()}} = ();
Menolly> my @untaken = grep {!exists $taken{$_->[0]}} @{$rd->{'sth'}->fetchall_arrayref()};
Menolly> $testDigest = @untaken[rand(@untaken)]->[0];
I didn't look at the rest, but this last line is illegal syntax.
It "accidentally" works, but what you're really saying there
is the same as:
$testdigest = $untaken[rand @untaken];
And you might as well say what you mean. :)
It will definitely stop working in the future, and is already a
"warnable" offense, that you would have caught with -w turned on.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
More information about the San-Diego-pm
mailing list