I am assuming you are trying to take input in from the command line, in which case, you need to change line 3 to the following:
my @a=@ARGV;
The @ARGV variable contains all of the command line arguments that are passed to the script, so if you called your script like this:
perl myscript.pl 1 15 5 7 3 99
You would find that
$ARGV[0] would be "1",
$ARGV[1] would be "15", and so on.
TStanley
--------
There's an infinite number of monkeys outside who want to talk to us
about this script for Hamlet they've worked out
-- Douglas Adams/Hitchhiker's Guide to the Galaxy