G'day all,

Just wondering if some one can help me with the folloing problem...?

Basically I have a variable that will change at regular intervals.  The
varible may look like this...

$var = "Crud Crud Call Distance: UNfasdfasdfasdfasdfasdn alternative".
"(fasdfsda) SuperZone region: Gawler Call Distance:";

($locat) = $content =~ /Located at:(.*)Call /);
print $locat;

SO that will print everything between the VERY last Call Distance.  Some
times there will not be a second Call Distance located in $var and
instead $var will look something like the following...

$var = "crud crud Crud";  # I.e there is no Call Distance in $var.

How can I get my code to check all possible outcomes?  Would I do
something like the following...

nextif (($locat) = $content =~ /Located at:(.*)Call /)) {
  print $locat;
nextif (($locat) = $content =~ /(.*)Call Distance/)) {
  print $locat;
}

Kind Regards,

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to