Ryan Dillinger wrote: > Hello; Hello,
> I have a script here, that for some reason I cannot get to > print out. Can someone please point out what I may be doing > wrong? I know I am going to feel like a Dummy! > Thanks so much for your help!! > > @array1 = (a, b, c,); Non-numbers need to be quoted: my @array1 = ( 'a', 'b', 'c' ); > @array2 = (1, 2, 3,); > > sub collect { > ($value1, $value2) = @_; $value1 and $value2 now contain references to arrays. To access the data in the arrays you need to dereference them. > print $value1; > print $value2; If you want the first value in each array: print $value1->[ 0 ], $value2->[ 0 ]; If you want to print the complete contents of both arrays: print @$value1, @$value2; > return @value1, @value2; return @$value1, @$value2; > } > > sub ([EMAIL PROTECTED], [EMAIL PROTECTED]); collect( [EMAIL PROTECTED], [EMAIL PROTECTED] ); perldoc perlsub perldoc perlreftut perldoc perlref perldoc perldsc perldoc perllol John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>