in reply to Re: Regular Expression Assistance
in thread Regular Expression Assistance
_Ass_uming safe input data here:
Anyway:my $filename = $ARGV[0] or die "No filename given\n"; open INPUT, "<", $filename or die "could not open $filename\n"; while (<INPUT>) { print $_ }; close INPUT;
my ($file_without_path) = $filename =~ /^.*?\/(\w*?\w*?\.ext)$/;
Still, I don't see the point if you trust the filename as being safe,
and just want to open it. (Since you will need the path anyway).
janx
|
|---|