Yes, that is exactly what was wrong with this script. Thanks so much!
John
At 05:41 PM 2/13/2004, you wrote:
--As of Friday, February 13, 2004 5:07 PM -0800, John Lin is alleged to have said:
for ($i=0; $i <= $#filenames; $i++) { [EMAIL PROTECTED]; if ($wanted_filename == $filename) { $append_filename=$filename . ';'; open(APPENDFILE, ">>/anotherdirectory/filename.txt"); print APPENDFILE $append_filename; close(APPENDFILE); } } ====================================
But for some reason, the IF statement did not work. In the filename.txt file, I am getting something like this:
--As for the rest, it is mine.
I think you want: if ($wanted_filename eq $filename)
That'll do a lexographic check instead of a numeric, which is what I think you want.
Daniel T. Staal
--------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
