No problem at all... ;-)
I just wanted to point you to the possibility that unpack can process many lines at the same time, (which essentially means "reading vertically").
use strict; use warnings; my $line_count = 10; my $line = join ("", 'a'..'z',"A".."Z") . "\n"; my $file= "$line" x $line_count; my $offset = 2; my $rest = length($line) - $offset -1; my $fmt = qq{(x${offset}ax${rest})${line_count}}; my @results = unpack $fmt, $file; print @results;
Will print cccccccccc because of offset 2
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^4: Faster and more efficient way to read a file vertically
by LanX
in thread Faster and more efficient way to read a file vertically
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |