Hi,
To ignore the white space in between ROAM and ACT use /x modifier of
Perl RE to extend your pattern's legibility by permitting whitespace
and comments. Hope that will serve your purpose.
Instead of
if ($msg =~ /roam act/i)
Use
if ($msg =~ /roam act/ix)
Regards,
Suvajit
K.Moeng wrote:
Hello again,
I have rephrased my question from yesterday,
I want to be able to ignore the white space in between ROAM and ACT
that is return the query as ROAM ACT without falling to the else statement.
$msg = $ARGV[0];
$msg =~ s/\"/' /ig;
$found = 0;
if ($msg =~ /roam act/i)
{
$name = 'ACTivated';
$found = 1;
}
elsif ($msg =~ /roam dact/i)
{
$name = 'DeACTivated';
$found = 1;
}
if ($found == 1)
print ".Thank you..........................\n";
}
else
{
print "Sorry. Your request has not been sent for Roaming.\n";
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>