Two things, first @array=(@array,$number); is more efficiently written as push @array, $number;. The way you wrote it the entire contents of @array are copied each time.
Second see Carp for printing the call stack. At its simplest
use Carp qw(carp); carp "data $variable not valid in mySub\n";
In reply to Re: Tracking down errors in data from input files.
by hipowls
in thread Tracking down errors in data from input files.
by why_bird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |