perlop and perlretut seem not to mention that $1, $2 ... are reset
even when one doesn't use ()'s.
"Hello World" =~ /W(o)rld/;
print $1; #prints "o"
"Hello World" =~ /World/;
print $1; #uninitialized value!
>> perlop and perlretut seem not to mention that $1, $2 ... are reset
>> even when one doesn't use ()'s.
b> The memory variables are always the values from the last successful
b> match. It doesn't matter what that match was. See their entry in
b> perlre.
b> Which parts of perlop and perlreftut
gmane.comp.lang.perl.documentation is now on gmane.org, so you can
read this group by NNTP. Oh, you already can otherwise. Well, the more
the merrier. Over and out.
Say, is if("@frogs" eq "@toads"){} worthy of being added to the top of
$ perldoc -q 'How do I test whether two arrays or hashes are equal?'
as a "beginners method (that has XYZ pitfalls, whereupon we try instead...)?
>> I might be wrong, but I had guessed that the OP had meant that in the
>> sense of "a beginner might think this would work, so maybe we should
>> explicitly point out that it doesn't".
Bingo.
b> ah, that would make more sense. In that case, sending a patch is
b> much better. :)
By definition beg
Gentlemen,
$ perldoc perlvar|col -b|grep SEPARATOR
$INPUT_RECORD_SEPARATOR
$OUTPUT_FIELD_SEPARATOR
$OUTPUT_RECORD_SEPARATOR...
So please mention next to $OUTPUT_RECORD_SEPARATOR why there is no
$INPUT_FIELD_SEPARATOR, i.e., probably say "use split()", or perl -aF.
OK, here's the (p
b> rewrite the part of the answer you think should change, then post it.
OK. Please make this the new result of
$ perldoc -q 'How do I test whether two arrays or hashes are equal?'
Found in /usr/share/perl/5.8/pod/perlfaq4.pod
How do I test whether two arrays or hashes are equal?
+ Fo
b> any change to the documentation shouldn't be so vague.
b> I don't see a reason to document that something doesn't exist.
I am confident that you can improve it. Just be sure to mention why
perl doesn't have awk's $FS or sh's $IFS. On average I look for it
once a year.
Please make perldoc -f shift mention splice.
(References: Re: perl lacks the n of sh's "shift n"
in news:comp.lang.perl.misc)
b> As I said, I don't see a reason to document something that doesn't
b> exist. That Perl does not have something another language has
b> is not enough reason to do anything.
Maybe there should be a new manpage, perllack, collecting all those
things that one would expect "Unix's Swiss Army Chains
Could mention NOOP too, even though it will be mentioned on perlop
soon too I believe.
In perlop, under "Constant Folding", please also mention if the ord in
$Bank = chr( ord("A") + $Bank );
gets folded.
$ man perlpacktut|grep 235|sort -u|sed 2q
01/29/2001 Camel rides to tourists 235.00
01/29/2001 Camel rides to tourists 1235.00
Inconsistent. Might be tip of iceberg.
13 matches
Mail list logo