|
|
| There's more than one way to do things | |
| PerlMonks |
Data extraction from text fileby usadhikari (Initiate) |
| on Aug 09, 2011 at 09:35 UTC ( #919440=perlquestion: print w/ replies, xml ) | Need Help?? |
|
usadhikari has asked for the
wisdom of the Perl Monks concerning the following question:
Dear Monks,
I am novice with perl, trying to extract data from a text file, given below is input and required output, could you please help me with a simple program.
INPUT PATTERN
-------
url: www.google.com
name: Umesh address: New Delhi room no: 001 phone no: 34738472 ------- url: www.yahoo.com name: Raj address: Sahadara room no: 002 phone no: ------- url: www.rediff.com name: Hem address: mumbai room no: 003 phone no: 84398419 ------- url: www.google.com name: Mukesh address: room no: 004 phone no: ------- name: abcxyz address: room no: phone no: 4814314783 ------- name: Rakesh address: jrieiqrjqq room no: phone no: ---------- output would be:
Back to
Seekers of Perl Wisdom
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||