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); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>