In your die command, say:
die "cannot open $LINE: $!\n";
This will give you a hint as to what's going wrong.
-----Original Message-----
From: Maxim Berlin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 11:51 AM
To: [EMAIL PROTECTED]
Subject: Re: open FILE problem
Hello Jennifer,
Thursday, July 12, 2001, Jennifer Pan <[EMAIL PROTECTED]> wrote:
JP> Hello all, I came across this problem opening up files that are fed in
JP> from command line using "ls". I do not know why this script did not
JP> work. Appreciated any input.
[...]
JP> at prompt I typed
JP> ls *.txt | perl format.pl
JP> it never worked!!!!
what OS do you use? script works well on my freebsd.
JP> it always "die" cannot open $LINE.
please show me output, exactly how your script produced.
JP> I don't understand why
me too :)
Best wishes,
Maxim mailto:[EMAIL PROTECTED]