$_=0;
Shouldn't this be
local $_ = 0;
to avoid global variable side effects (see local)?
$_=0; $x < $y && $_--; $x > $y && $_++; $_;
And how does this code differ in effect from
$x <=> $y;
(see <=>
in Equality Operators
in perlop)?
(And a small point, but , (comma) is used as the delimiter in the OPed example data instead of : (colon), which you use in the s/:.+// extraction substitutions.)
Give a man a fish: <%-{-{-{-<
In reply to Re^2: How can I sort my array numerically on part of the string?
by AnomalousMonk
in thread How can I sort my array numerically on part of the string?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |