Be careful with those global variables. @data worries me.
Why not let input() return an array ref?
my $data = input(); foreach my $info (@$data) { # do other stuff } # ------------------ sub input { my @data; # do stuff return \@data; }
TGI says moo
In reply to Re^3: reference question yet again
by TGI
in thread reference question yet again
by convenientstore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |