#!C:\strawberry\perl\bin\perl # use Crypt::CBC; # my ($line, $outf, $filen); my $cipher = Crypt::CBC->new( -key => 'fjeislqp12345678', -cipher => 'Blowfish'); # get filename if($#ARGV == -1) { print STDERR "$runtime::No data directory specified on the command line\n"; close(STDERR); exit; } $filen = $ARGV[0]; # $outf = "test.txt"; open(OUTFILE, ">>", $outf) or die "Can't open $outf to write: $!\n"; open(INFILE,$filen) or die "Can't open $filen for reading $!\n"; $cipher->start('decrypting'); print OUTFILE $cipher->crypt($_) while(); # while () { # $line = $_; # print OUTFILE $cipher->crypt($line); # } print OUTFILE $cipher->finish(); close(INFILE); close(OUTFILE);