in reply to Testing if file exists

Try this:

#!/usr/bin/perl -l use File::Spec; my $file = "$mall_path/keywords/$filename"; print "Checking " . File::Spec->rel2abs($file); if (-e $file) { #file exists - set variable and other things }

Update: Urg, too much Java earlier today. Changed + to . in print statement. Thanks shenme.