Friday, 16 December 2022

What is the use of file test operator in perl?

 Method1:

 print "file exists!\n" if -e $base_path;

Method2: 

print " it is a plain file!\n" if -f $base_path;

Labels: