Hi List ,
I have a directory that I want to read . Lets say the name of the directory is my scripts (Windows platform ) . In this directory is text files . What I want to do is read the directory and extract 2 lines out of each text file . So far I'm able to create an Array but I'm not sure how to now read the text files and extract 2 lines (they are dynamic as far as info but always the same line numbers) . Here is what I have so far : #!/usr/bin/perl -w use strict; opendir(MYSCRIPTS, 'c:\support\my scripts') || die "cannot open my scripts: $!"; @FILES=readdir MYSCRIPTS; # reads the contents of the directory closedir(MySCRIPTS); @FILES=<*.txt>; #Glob only the text files Thats what I got so for . I would like to know if I'm going about it the right way or is there a better way to go . Please keep in mind that I'm a beginner . :) Thanks Chris Federico Dep:AITS e-mail : [EMAIL PROTECTED] (631) 233-6647 Systems Engineer ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]