Hi, So I tried something like this .It works ! if( $_ =~ m/ID\s=\s"(.*?)"\sDirAbsolute/){ print " Test ID is $1 \n" ; }else{ print " FAILED to locate Test ID \n" ; }
May be its crude way. Thanks Alok. ----- Original Message ---- From: Chas Owens <[EMAIL PROTECTED]> To: alok nath <[EMAIL PROTECTED]> Cc: beginners@perl.org Sent: Thursday, June 28, 2007 6:38:09 PM Subject: Re: parsing a line On 6/28/07, alok nath <[EMAIL PROTECTED]> wrote: > Hi, > I am parsing a file which has lines like this. > <Test Description = "Test 1" ID = "ID A1" DirAbsolute = "C:/perl"/> > Got stuck up while trying to extract values of fields called > Description, ID ? What have you tried? ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/