Re: move data into separate directory

2003-02-06 Thread Rob Dixon
Rob Dixon made a couple of mistakes in writing: >> >> closedir(DIR); > > Do this after you've finished reading it. (meaning 'directly after you've finished reading the directory' :) > This should work roughly as intended. If you need to know what > your current working directory is, > > use C

Re: move data into separate directory

2003-02-06 Thread Rob Dixon
Jose Malacara wrote: >> opendir(DIR, 'data') ... > > This allows me to grab the correct file names from within the 'data' > directory, but I guess that my problem happens when the script > actually goes to parse those files that it only looks for the > filenames locally, rather than in the actual '

Re: move data into separate directory

2003-02-05 Thread R. Joseph Newton
Jose Malacara wrote: > foreach my $file (@files) { >my $input="$file"; > > open(INFILE,"$input") || die "Can't open file $input"; #<=== is opening > correct file name, but not 'data/logfile1. I think your problem is here. Presuming that data is a subdirectory of the directory your script

Re: move data into separate directory

2003-02-05 Thread Jose Malacara
ot;; } } } } closedir(DIR); close INFILE; == - Original Message - From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> To: "Jose Malacara" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 8:11 PM

Re: move data into separate directory

2003-02-04 Thread R. Joseph Newton
Jose Malacara wrote: > opendir(DIR, "."); > my @files = readdir(DIR); How about: opendir (DIR, "../adm"); ? It works for me. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: move data into separate directory

2003-02-04 Thread Wiggins d'Anconia
Sure lots of ways, this is Perl ;-)... Jose Malacara wrote: Hello. I have a script that parses csv files for the occurence of an IP address that is passed to the script as an argument when it runs. Currently, I can only run the script from within the same directory as my data files. I would like

move data into separate directory

2003-02-04 Thread Jose Malacara
Hello. I have a script that parses csv files for the occurence of an IP address that is passed to the script as an argument when it runs. Currently, I can only run the script from within the same directory as my data files. I would like to be able to move my csv files into a separate data direc