use strict; use warnings; use Crypt::CBC; my $cipher; $cipher = Crypt::CBC->new( -key => $secret_key, -cipher => 'Blowfish' ); local $/; unless ( open(INPUT,"<$filename") ) { die("open failed for file '$filename' : $!\n"); } # UNLESS $data = ; close(INPUT); $decrypted = $cipher->decrypt($data); @lines = split(/\r\n/,$decrypted); $num_lines = split(/\r\n/,$decrypted);