in reply to Re: Compilation error
in thread Compilation error
#!/usr/bin/perl use strict; use warnings; my@array = qw(one two three four five six seven eight nine ten); print "The original array contains - @array \n"; my@sorted = sort {$a <=> $b} @array; print "The sorted array contains @sorted \n";
The original array contains - one two three four five six seven eight nine ten
Argument "one" isn't numeric in sort at C:\JPARK\JPERL\test.pl line 7.
Argument "two" isn't numeric in sort at C:\JPARK\JPERL\test.pl line 7.
Argument "three" isn't numeric in sort at C:\JPARK\JPERL\test.pl line 7.
.
.
.
The sorted array contains one two three four five six seven eight nine ten
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Compilation error
by toolic (Bishop) on Oct 09, 2012 at 16:41 UTC | |
by truthseeker66 (Novice) on Oct 09, 2012 at 16:46 UTC | |
|
Re^3: Compilation error
by kcott (Archbishop) on Oct 09, 2012 at 21:09 UTC | |
|
Re^3: Compilation error
by Marshall (Canon) on Oct 09, 2012 at 21:11 UTC |