in reply to how to find the length of any line of file

Try also this variations:

#!/usr/bin/env perl use strict; use warnings; use feature qw(say); use Path::Tiny; my $file = $ARGV[0]; while (<>) { chomp; say length; } say q(--); open my $fh, q(<), $file or die $!; while (<$fh>) { chomp; say length; } close $fh; say q(--); say length for path($file)->lines( { chomp => 1 } ); __END__ karls-mac-mini:monks karl$ ./lenght.pl file.txt 6 8 8 3 8 9 -- 6 8 8 3 8 9 -- 6 8 8 3 8 9

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