in reply to Returning multiple values from a subroutine
Hi, You are returning an Array reference and scalar reference, but the value get assigned into an array, So both the returning reference saved into @subs array
. change the code asmy ( $subs, $SubId ) = getsubsFromAcct( $currAcct ); my $length = @$subs; print ("No of subs : $length and subs are @$subs");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Returning multiple values from a subroutine
by rkrish (Acolyte) on Dec 28, 2012 at 12:33 UTC | |
by muba (Priest) on Dec 29, 2012 at 02:19 UTC |