http://www.perlmonks.org?node_id=998032

truthseeker66 has asked for the wisdom of the Perl Monks concerning the following question:

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.. . . .