Hello,
This is my first post here.
I am trying to create a simple perl script to delete session files automatically using regex,
but my simple tiny regex won't find the file. The file is located in the same dir where the script
executes.
#!"c:/perl/perl/bin/perl.exe" # Script name = use warnings; use diagnostics; use strict; my $file = qr/carlos\.txt/; if (defined($file) && ($file =~ /carlos\.txt/)){ print "file found"; } else { print "file not found"; }
Any suggestions?
Thanks!
Carlos
In reply to Perl script to delete files using regex by CarlosN
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |