What you are currently doing is searching for "-process" in this $_ (magic operator) which you have assigned the value 'process1.' Running this yields nothing because '-process' is not in 'process1.' A better approach would be:
my $string = 'process1'; if ($string =~ /process/) { print "success"; }
This searches $string for the text "process." (for more information on these matches read up on regular expressions)
In reply to Re: help in matching
by MCS
in thread help in matching
by uva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |