I am trying to use the regular expression start of word i.e \< but it is not working. Can you please help me out with this?
My program is as follows but I am getting answer 'no'.
#!/usr/bin/perl -w
use strict;
my $string = " cat mat rat pat\n";
if ($string =~ /\<cat/) {
print "yes\n";
} else {
print "no\n";
}
exit 0;