#!"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"; }