Ravi Malghan wrote: > Hi: I am extracting some value from $complete_event as > follows. What can I check to see if the extraction > returned a valid value? "if($_)" seems to be giving > incorrect values. In the following statement, $srcIp > is being set to an old extracted value if there is no > valid value following srcIP in my $complete_string > instead of 0. > > $complete_event =~ /srcIp=(.+) srcPort=/; if ( $complete_event =~ /srcIp=(.+) srcPort=/ ) { # true } else { # false } Wags ;) > if($_) {$srcIp = $1;} > else {$srcIp = 0;} > > Thanks > Ravi > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com
********************************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ********************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>