in reply to Really dumb question... ('ne' not working)

Try to put use strict; at the top of your script and always run it with the -w commandline switch. This often gives you a better idea of what *could be going wrong.
I ran you script like this and it didn't produce the error
use strict; use vars qw($tmp_dir $dir); open OUTPUTFILE, ">test.txt"; $tmp_dir = "test"; $dir = "tester"; if ($tmp_dir ne $dir) { print "dumping to file\n"; print OUTPUTFILE "\n$tmp_dir\n"; $dir = $tmp_dir; }
Maybe there is something wrong in your assignment of $tmp_dir and $dir...

Jorg

"Do or do not, there is no try" -- Yoda