Suppose I have 3 variables.
my $val1 = './f1/abc.txt'; #f1 is the folder where abc.txt resides.
my $val2 = './f1/def.txt';
my $val3 = 'gh.txt';
I am facing an issue while reading the './f1/' part.
if ($val1 =~ m/^a.*\.txt$/ or $val2 =~ m/^d.*\.txt$/) { print $val3; }
this doesn't work with the folder name. Please help.