in reply to Re: Re: Re: Re: Passing an array to a subroutine
in thread Passing an array to a subroutine
open(FILE, $data) or die "Can't open ($data): $!";
That gives you the name of the file, surrounded by non-whitespace characters as a sanity check, along with the system error message. You'll have better luck if you let Perl help you.Update: If it's not a file, don't open it. open works on files (in the Unix sense). If you have the data you want to munge already in an array or a scalar, use split or a regex to get at it. That's the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Passing an array to a subroutine
by gisrob (Novice) on Aug 01, 2001 at 00:25 UTC |