Here is my code:
#!/usr/bin/perl -w
use Crypt::CBC;
my $scriptkey = qx(cat /tmp/scriptkeyfile);
chomp $scriptkey;
print new Crypt::CBC(-key=>"$scriptkey",-salt=>"my_salt")->encrypt(qx(cat $ARGV[0]));
This script only encrypts first line of given file. If I change encrypt to decrypt, it will only decrypt one line of given file. How to change this, to crypt whole file.