When I run this script I keep getting an compilation error. How can I trouble shoot? Thank you for help
#!/usr/bin/perl use strict; use warnings; @array = qw(one two three four five six seven eight nine ten); print "The original array contains - @array \n"; @sorted = sort {$a <=> $b} @array; print "The sorted array contains @sorted \n";
C:\JPARK\JPERL>test.pl Possible unintended interpolation of @array in string at C:\JPARK\JPERL\test.pl line 6. Possible unintended interpolation of @sorted in string at C:\JPARK\JPERL\test.pl line 9. Global symbol "@array" requires explicit package name at C:\JPARK\JPERL\test.pl line 5.. . . .
In reply to Compilation error by truthseeker66
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |