yanirdz has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have trouble extracting paragraph from multi line string
Nothing gets printed. If I don’t use:# the UNIX tool output is a multi line text my $var = `unix_tool file_name`; open(FH,'<', \$var) or die "ERROR\n"; $/ = ""; #This is just for example while (<FH>){ print "------------------------------------------\n"; print "$_"; print "\n"; }
All the lines get printed. And one more thing, If I first save the UNIX tool output file and open it using file handler the code read every paragraph.$/ = "";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Extract paragraph from multi line string
by kennethk (Abbot) on Jan 26, 2010 at 15:37 UTC | |
Re: Extract paragraph from multi line string
by AnomalousMonk (Archbishop) on Jan 26, 2010 at 16:24 UTC | |
Re: Extract paragraph from multi line string
by jwkrahn (Abbot) on Jan 26, 2010 at 15:58 UTC | |
Re: Extract paragraph from multi line string
by ikegami (Patriarch) on Jan 26, 2010 at 16:15 UTC | |
Re: Extract paragraph from multi line string
by Krambambuli (Curate) on Jan 26, 2010 at 17:45 UTC |
Back to
Seekers of Perl Wisdom