I'm going back through some old code and trying to clean things up, apply
new tricks, and make sure everything is running in strict mode. Doing this
I have encountered a problem. I have a subroutine that calls another
subroutine, passing one array to the second for processing. I need the
second sub to return 3 arrays to the first sub. I can't seem to get this
to work....well I can return the data from all three subs, but it returns
into one array. Is there an option to do this or do I need to rewrite the
second subroutine into 3 smaller subs? or maybe I'm not using my
correctly...running without use strict; and not using my on the arrays
makes them global and avaiable for processing by the first sub...but I want
to use strict;
sub sub1 {
my (@array1,@array2,@array3,@array4);
(@array2,@array3,@array4)=&sub2(@array1);
dosomething;
}
sub sub2 {
my(@array5,@array6,@array7,@array8);
@array5=@_;
do three processes with @array5 and store results in arrays 6-8;
return(@array6,@array7,@array8);
}
--------------------------------------------------------------
Mike Garner
Western State College
Email: [EMAIL PROTECTED]
Voice: 970-943-3123
Fax: 970-943-7069
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]