in reply to Array refs

I would return an arrayref instead
sub func1 { # do some stuff return [$a, $b]; }
Then you can do stuff like
$ref = fuc1(); #or @ref = @{func1()};
Hope that helps ;)