in reply to Help on foreach loop

Hi vroom

Hmm.. There are many strange things in your script
(atleast strange for me)
@ARGV = <$responseDir/*>; while (<>) { $newFile = $ARGV, last if /^"$commonField"$/; }

Does the @ARGV = <$responseDir/*>; acctually work?
Why while (<>) when u check against that but
assigning from $ARGV (which hasn't anything to do with @ARGV)

well that was just a few questions ...

Good luck

/jocke

Replies are listed 'Best First'.
Re^2: Help on foreach loop
by Anonymous Monk on Sep 09, 2004 at 15:07 UTC
    yes that did work, the problem comes when it iterates through the next foreach loop, it dosen't change the value of $newFile
Re^2: Help on foreach loop
by Mr. Muskrat (Canon) on Sep 09, 2004 at 23:57 UTC

      The preview page shows "by vroom" (as the edit node, I'm sure) so that might be it.