I have a Perl subroutine which returns an array of vaules, and I’d like to call that subroutine and capture those values in individual scalar variables.
I know how to do this when initializing a group of scalars:
my ($workBenchId, $woId, $woTrayId, $trayId, $customerNumber) = SubRoutineA();
But I’m not sure how to do it with that same set of scalars (since I can’t use ‘my’ again):
($workBenchId, $woId, $woTrayId, $trayId, $customerNumber) = SubRoutineA();
Thanks for your help – I’m new at Perl.
Alternatively you can first just define your variables and later use them without
my: