Probably just a typo on your part, but I think this is what threw
the OP when he tried your code. The second comma: you
probably meant that to be a concatenation operator, yes?
You want
open TMP, ">" . $tmp or die "Couldn't open $tmp: $!";
actually, i got confused by the fact that i have Perl 5.6.0
installed and it has a new variant of open with the following
signature:
open HANDLE, MODE, LIST
sorry that i didn't notice it was Perl 5.6 only, but i don't
use files too often. i figured the other signature was there
to avoid cross platform problems easier.