Sorry I'm newish to Perl so I apologize if I'm asking simple questions.
So all I would need to do is add $/ = 30; to my code and it should only read in the first 30 characters? So something like:
open (LOG, $file); open (OUT, ">", $outf); $/ = 50; my $header = <LOG>; print OUT $header; while (<LOG>) { print OUT $_ if ($_ =~ /^\{\|\d{4}-\d{2}-\d{2}_\d{2}.\d{2}.\d{2}\| +LOGIN/); } close LOG; close OUT;
In reply to Re^2: Out of Memory - Line of TXT too large
by MajinMalak
in thread Out of Memory - Line of TXT too large
by MajinMalak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |