Elie De Brauwer wrote:
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";
}

I also assume you are aware that your "if ($found)" block is in the wrong place as it should be beneath the else (or another one should be added in the first if block.


-> Actually you have a missing { after your last if which my 'still too early in the morning mental perl interpreter' didn't see the first time.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to