How to know if a file exists using PERL

charlygarcia120

Carlos Alberto

Posted on October 12, 2022

How to know if a file exists using PERL

The follow code shows if a file exists using PERL lenguaje


$filename="FILEX.TXT";
if (-e $filename) {
   print "File Exists!";
} 
else
{
   print "don't exists";
}
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
charlygarcia120
Carlos Alberto

Posted on October 12, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related