This may not be optimal for your situation, but it is possible to change your linebreak value to something more suitable to your needs;
#Untested { # localize the block local $/ = q{ } # space character is the new newline my $fh; unless (open $fh, "<".$logfile_name) { die ("File open failure\n\t$!\n"); } my $buffer; while (<$fh>) { next if /\n/; if (/^\d\d:\d\d:\d\d/) { print $buffer." "; $buffer = $_; } else { $buffer .= $_." "; } print $buffer; close $fh; }
In reply to Re: text parsing question
by snopal
in thread text parsing question
by perlAffen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |