in reply to if file does not exist

Just add this to the start of the loop:
next if (! -f "../XML/$id.xml");
Updata: Aristotle's solution is a tad better using -e instead of -f.

Remember: There's always one more bug.

Replies are listed 'Best First'.
Re^2: if file does not exist
by Your Mother (Archbishop) on Nov 21, 2005 at 19:00 UTC

    I think your solution is actually better because -e will return true for a directory too. So-

    next if not -f $fname; # or the somewhat too dense warn "$fname is not a file" and next unless -f $fname;