M
Manasa
Is there a Perl's equivalent of MySQL "like" operation?
I have to match names from the database in the same way as MySQL's
like operation without executing a mysql query.
I have tried Perl's String::Approx but even that does not completely
solve my problem.
This is what I want to do:
$name = "CIVITAF INCORPORATED";
And my hash has the following:
$hash->{"CIVITAF INC OF CALIFORNIA"} = "121212";
I want to do this
foreach $key (keys %{$hash}) {
if ($key like $name) {
....
.....
}
}
Any help would be appreciated.
Thanks,
Manasa
I have to match names from the database in the same way as MySQL's
like operation without executing a mysql query.
I have tried Perl's String::Approx but even that does not completely
solve my problem.
This is what I want to do:
$name = "CIVITAF INCORPORATED";
And my hash has the following:
$hash->{"CIVITAF INC OF CALIFORNIA"} = "121212";
I want to do this
foreach $key (keys %{$hash}) {
if ($key like $name) {
....
.....
}
}
Any help would be appreciated.
Thanks,
Manasa