sub func1 { # do some stuff return [$a, $b]; } #### $ref = fuc1(); #or @ref = @{func1()};