texuser74 has asked for the wisdom of the Perl Monks concerning the following question:
when i tried the following code, only 1 line is getting extrated(first instance). But there are more than 1 line in input text file that starts with "@".
open(IN, "<input.txt"); while(<IN>) { s#\@(.*?)\n##;my $temp=$1; print "output: $temp\n"; } close(IN);
Please advise.
20040907 Edit by ysth: code in code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: working with files
by davorg (Chancellor) on Sep 03, 2004 at 10:46 UTC | |
|
Re: working with files
by Arunbear (Prior) on Sep 03, 2004 at 10:45 UTC | |
|
Re: working with files
by bronto (Priest) on Sep 03, 2004 at 10:54 UTC | |
|
Re: working with files
by tachyon (Chancellor) on Sep 03, 2004 at 10:57 UTC | |
|
Re: working with files
by THuG (Beadle) on Sep 03, 2004 at 12:52 UTC | |
by texuser74 (Monk) on Sep 03, 2004 at 13:22 UTC | |
|
Re: working with files
by rupesh (Hermit) on Sep 03, 2004 at 10:43 UTC | |
|
Re: working with files
by Anonymous Monk on Sep 03, 2004 at 11:46 UTC |