--- Jennifer Pan <[EMAIL PROTECTED]> wrote:
> Hello all, I came across this problem opening up files that are fed
> in from command line using "ls". I do not know why this script did
not
> work. Appreciated any input.
>
> #!/usr/local/bin/perl
>
> # I am trying to feed all the files in this d
ls format is OS dependant. On Solaris ls returns a multiple column list, so the first
line would be multiple filenames.
Chris D. Garringer
LAN/WAN Manager
Master Certified Netware Engineer
Microsoft Certified Systems Engineer
Certified Solaris Administrator
Red Hat Certified Engineer
[EMAIL PROT
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
Here is one way:
open X, ">>output.txt";
while (<>) {
s/^\s*//;
print X "$_";
}
close X;
Since it looks like you are coming from unix environment, you could do:
format.pl *.txt
which will read in all files one after the other automatically. Now if you
want some breakout, then
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>