in reply to Re: Re: Re: Re: Re: Passing an array to a subroutine
in thread Passing an array to a subroutine

Ok - in the spirit of letting perl help me, how does open handle arrays that are not explicitly files? In my code, $data is just what I read in from @_, not a file. But when I run this (even in the debugger) all the contents of $data are written to STDOUT and the program terminates (not the desired output!). Update: I did what you suggested, and get the following error:
): File name too long at ocean_return2b.pl line 176, <STDIN> line 4. Debugged program terminated. Use q to quit or R to restart,
line 176: open(FILE, $aref) or die "Cannot open: ($aref): $!"; It seems that it tries to open the entire contents of $aref, as that is what is returned to the screen.