in reply to Really dumb question... ('ne' not working)
Maybe there is something wrong in your assignment of $tmp_dir and $dir...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; }
|
|---|