in reply to Using return values in subroutines

sub first{ some stuff return @somearray } sub second{ my @Something = @_; #then do whatever } sub main{ second(first); } main;
You dont really need to set a main routine. and y are you calling the subroutines as if it was a typeglob? You do not need the & prefix