in reply to Loading a part of the file to array using Tie::File
"...a part of a file using Tie::File..."
You might try something like this:
#!/usr/bin/env perl use strict; use warnings; use feature qw(say); use Tie::File; my $file = q(data.txt); my ( $start, $end ) = ( 1, 3 ); tie my @array, 'Tie::File', $file or die $!; for ( $start .. $end ) { $_ = -$_; say qq($_: ), $array[$_]; } untie @array; __END__ karls-mac-mini:monks karl$ ./tie.pl -1: cuke -2: nose -3: baz karls-mac-mini:monks karl$ cat data.txt foo bar baz nose cuke
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help
|
---|