What exactly are you trying to do and what values are you using for your
test?
-----Original Message-----
From: kapil.V [mailto:[EMAIL PROTECTED] 
Sent: 11 September 2007 07:06
To: beginners@perl.org
Subject: Help with data returned by regex match

Hi,

#!/usr/bin/perl -w
my $path = shift;
my $machine = shift;
my (undef,$country, $property) = split /\//,$path; 
my $xmlData = qx!./pindown. php $machine!; my @contacts = $xmlData =~
/property name=\"$property\ " 
country=\"$country\ ">.+?<contact type=\"admin\ ">.+?<\/contact> /is; #print
"$&\n"; print @contacts;

This prints "1"
But printing $& prints a block of XML.
Why does the array contacts not contain the pattern matched?(Also tried
assigning the matched pattern to a scalar.)

Thanks,
Kapil.V

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



This e-mail is from the PA Group.  For more information, see
www.thepagroup.com.

This e-mail may contain confidential information.  Only the addressee is
permitted to read, copy, distribute or otherwise use this email or any
attachments.  If you have received it in error, please contact the sender
immediately.  Any opinion expressed in this e-mail is personal to the sender
and may not reflect the opinion of the PA Group.

Any e-mail reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.





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


Reply via email to