in reply to Using return values in subroutines
Just use first as the parameter to second:
use strict; use warnings; second (first ()); sub first { my @something = qw'apple monkey banana horse'; return @something; } sub second { print "@_"; }
Prints:
apple monkey banana horse
Note that the &sub calling syntax is generally frowned on unless you really want to use it to pass the @_ for the current sub into the called sub.
|
|---|