shemp has asked for the wisdom of the Perl Monks concerning the following question:
use strict; ... sub ip_sorter {
so, 1 issue i had was that i couldnt put "no strict" in the map block. I dont know why this is, any insight would be great.my @a_parts = split /\./, $a; my @b_parts = split /\./, $b; my $result; map { return $result if $result = ($a_parts[$_] <=> $b_parts[$_]) +} (0 .. $#a_parts);
I've looked for this variable at search.cpan.org/author/JHI/perl-5.8.0/pod/perlvar.pod to no avail.... map { return $^C if ($a_parts[$_] <=> $b_parts[$_]) }; ...
Fixed typo at author's req - dvergin 2003-05-14
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparison result capture???
by pzbagel (Chaplain) on May 14, 2003 at 17:20 UTC | |
|
Re: Comparison result capture???
by chip (Curate) on May 14, 2003 at 16:22 UTC | |
by boo_radley (Parson) on May 14, 2003 at 17:10 UTC | |
by chip (Curate) on May 14, 2003 at 20:41 UTC | |
by dragonchild (Archbishop) on May 14, 2003 at 16:58 UTC | |
by chip (Curate) on May 14, 2003 at 20:44 UTC | |
by shemp (Deacon) on May 14, 2003 at 18:00 UTC | |
|
Re: Comparison result capture???
by flounder99 (Friar) on May 14, 2003 at 19:57 UTC |