Assigning scalars from a subroutine which returns an array in Perl -


i have perl subroutine returns array of vaules, , i'd call subroutine , capture values in individual scalar variables.

i know how when initializing group of scalars:

my ($workbenchid, $woid, $wotrayid, $trayid, $customernumber) = subroutinea(); 

but i'm not sure how same set of scalars (since can't use 'my' again):

($workbenchid, $woid, $wotrayid, $trayid, $customernumber) = subroutinea(); 

thanks - i'm new @ perl.

alternatively can first define variables , later use them without my:

my ($workbenchid, $woid, $wotrayid, $trayid, $customernumber); ... ($workbenchid, $woid, $wotrayid, $trayid, $customernumber) = subroutinea();  ... ($workbenchid, $woid, $wotrayid, $trayid, $customernumber) = subroutinea();  ... ($workbenchid, $woid, $wotrayid, $trayid, $customernumber) = subroutinea();  

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -