in reply to help in matching

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)

Replies are listed 'Best First'.
Re^2: help in matching
by uva (Sexton) on Feb 09, 2006 at 04:55 UTC
    thanks for your replies friends..... i understood..