Re: New to Perl and stuck

2009-03-03 Thread Andy_Bach
> My goal is to automate this so that after specifying a folder, Perl will pull the specified lines from each of the 25 txt files in that folder and write them to a single output file. If you don't need file names etc, you can just expand your pointies to use a glob @output = <*.txt> but that

Re: New to Perl and stuck

2009-03-03 Thread Chris Wagner
Hi. Try this with the directory name as the command line argument. Let me know if u have any questions. I really recommend getting one of the O'Reilly books to really get into Perl. %estparms = map {$_, 1} (18,21..24,28..31,206..208); %popparms = map {$_, 1} (220,223..226,229..233,424..426); $

RE: New to Perl and stuck

2009-03-03 Thread Steve Howard (PFE)
Just in the simplest and most general of terms, what it sounds like you want to do is an opendir on the folder, then use readdir to get each of the file names. Store each filename in a variable, and use it in the open command to open the file. You might want to put the code that actually extra

New to Perl and stuck

2009-03-03 Thread Bryan Keller
Hi all, The following gets me the lines I need for any single txt file. #!usr/bin/perl use warnings; use strict; my @output = <>; print "$ARGV"; print ("\nESTIMATION\n"); print @output[18,21..24,28..31,206..208]; print "\nPOPULATION\n"; print @output[220,223..226,229..233,424..426]; These txt f