my($val)=$history[0]->{'input_contents'} =~ m/\$id\s*=\s*\'([^']*)\'\;/ ; print $val ;
Manav |-----Original Message----- |From: Jerry Preston [mailto:[EMAIL PROTECTED] |Sent: Wednesday, January 26, 2005 5:58 PM |To: 'Perl Beginners' |Subject: How to read this array? | | |I have this array and I am trying to figure out how to read $id |in it. Any |ideas? | |@history = ( | { | program => 'racer', | version => '0.45', | input => { | '/home/' => undef, | }, | input_contents => ' | $name = \'Jerry\'; | $id = \'035\'; | 1; | ', | perl => { | location => '/home/', | version => 5.00502 | } | } |); | |Thanks, | |Jerry | ********************************************************* Disclaimer: This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. ********************************************************* Visit us at http://www.mahindrabt.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>