sam_0056 has asked for the wisdom of the Perl Monks concerning the following question:
To:sanju <sip:san@36.212.176.07> From: paka<sip:sam@36.212.176.92> Contact: sanjay<sip:san@36.212.176.07:5060>
my $data='ink.txt'; open DATA, "$data" or die "can't open $data $!"; my @array_of_data = <DATA>; foreach my $line (@array_of_data) { if ($line =~ m/To:/i) { $to=$line; print "To is: $to\n"; } if ($line =~ m/From:/i) { $from=$line; print "From is: $From\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to retrieve the string after the space???
by davorg (Chancellor) on Sep 07, 2006 at 12:17 UTC | |
|
Re: How to retrieve the string after the space???
by rsriram (Hermit) on Sep 07, 2006 at 13:03 UTC | |
|
Re: How to retrieve the string after the space???
by McDarren (Abbot) on Sep 07, 2006 at 14:30 UTC | |
|
Re: How to retrieve the string after the space???
by DentArthurDent (Monk) on Sep 07, 2006 at 16:07 UTC | |
|
Re: How to retrieve the string after the space???
by graff (Chancellor) on Sep 08, 2006 at 01:27 UTC |