I've not used IO::All at all, but, some things to try.. print that $temp_file with Data::Dumper, and see what it contains (Im guessing undef, or some value thats supposed to be the filehandle thats undef). Try setting PERLDB_OPTS='NonStop frame=1 AutoTrace LineInfo=tperl.out' (as an environment variable), and running it using perl -d (then read the resulting tperl.out) ?
Also, you didn't mention what system/perl/IO::All versions you're using..