techm has asked for the wisdom of the Perl Monks concerning the following question:
I tried everything before posting this ... so here it goes. I'm using a ClearCase::CtCmd module to work with ClearCase instead of a command line tool.
Here's a snippet: my ($res, $txt, $err) = $ct->exec("$lspvob"); In this case $txt results in a pretty big string with newlines. So I want to filter every line so I used (it's in Q&A section): my $fh = new FileHandle("printf \'$txt\' |") or die; Oddly:
Any idea why is this happeining? Or any other way to filter the lines or create an array that contains all of the lines?print $txt; # prints the text as expected. while (<$fh>){ # prints only part of the text. print $_; }
Thanks in advance!
Edit by dws to add <code> tags
Edit kudra, 2002-08-28 Changed title
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strings again
by dws (Chancellor) on Aug 27, 2002 at 21:55 UTC | |
|
Re: strings again
by Aristotle (Chancellor) on Aug 27, 2002 at 22:03 UTC | |
|
Re: strings again
by techm (Initiate) on Aug 27, 2002 at 22:15 UTC |