in reply to Help on foreach loop

I think @ARGV is only reaccessed by <> when the ARGV file is at eof/closed. Try: $newfile = $ARGV, close(ARGV), last if /^"$commonField"$/;

Replies are listed 'Best First'.
Re^2: Help on foreach loop
by Anonymous Monk on Sep 09, 2004 at 16:01 UTC
    nope .. didn't work
      I think it's still needed, even if it doesn't fix your apparent problem. Have you printed out @ARGV before and after the while loop to see if it is as you expect? I suggest lots of print statements or a run through with perl -d.
        Any other ideas guys