G
Guest
In the code fragment below, I'm doing a substitution
of the key/value pairs in a hash using s/$key/$value/g;.
How can I determine if a match is found? I want to do
something like:
If (match found) {
print "FOUND MATCH";
}
-Thanks
#############################
return unless -T;
print "Processing==> $File::Find::name\n";
my $obj = tie(my @array, 'Tie::File', $_) || die "$!\n";
for (@array) {
while ((my $key, my $value) = each %strings) {
s/$key/$value/g;
}
}
untie @array;
of the key/value pairs in a hash using s/$key/$value/g;.
How can I determine if a match is found? I want to do
something like:
If (match found) {
print "FOUND MATCH";
}
-Thanks
#############################
return unless -T;
print "Processing==> $File::Find::name\n";
my $obj = tie(my @array, 'Tie::File', $_) || die "$!\n";
for (@array) {
while ((my $key, my $value) = each %strings) {
s/$key/$value/g;
}
}
untie @array;