Re: run script on multiple files
- From: perrin@xxxxxxxxxxxx (Chad Perrin)
- Date: Fri, 22 Dec 2006 19:33:01 -0700
On Fri, Dec 22, 2006 at 08:04:39PM -0600, Kirk Wythers wrote:
I have written a short perl script that munges climate data and then
loads it into a postgres database. It works fine on one file at a
time... syntax is ./program.pl filename
I would like to run it in a directory with multiple files. I have
tried syntax ./program.pl file1 file2, but only the first file gets
processed. Can anyone help me figure out how to run this script on a
directory full of files that all need to be processed?
Yes, some of us probably can help. We'll probably need to see what
you're trying so far to be able to give the most helpful responses
possible, however, for solving your problem. Right off the top of my
head, without any other information, I'm just inclined to say "Try using
'while (<>)' to access file contents." That may not suit your needs at
all, though, since I don't know exactly how you need your file access to
fit into the program.
--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
print substr("Just another Perl hacker", 0, -2);
.
- Follow-Ups:
- Re: run script on multiple files
- From: Kirk Wythers
- Re: run script on multiple files
- References:
- run script on multiple files
- From: Kirk Wythers
- run script on multiple files
- Prev by Date: run script on multiple files
- Next by Date: Re: run script on multiple files
- Previous by thread: run script on multiple files
- Next by thread: Re: run script on multiple files
- Index(es):