Help! Need to convert bash shell to perl

Hello All. I am very new to Linux and I am currently interning. I have been working on a project for 2 weeks now and I have had no success. I have to convert bash shell into perl to decrypt and store files. Here is the code in Linux and Bash. Any help would be greatly appreciated.

$ cd/usr/data/images/idtdata
$ mv pgs/155*.pgp .
$ ./dcryptidt (dcryptidt written in bash is:
for i in `ls -l *.pgp`
do
`/usr/bin/gpg --passphrase-fd 0 $i < .sunspot`
done)
$ mv .pgp pgps/080531
$ cd txts
$ mv ../
.txt .
$ rm loadfile.seq
$ ./updidtf (updidtf written in bash is:
for i in `ls -l *.txt`
do
`./cnvidtf.pl $i`
`curl -u mydrive:password --disable-epsv -T loadfile.seq
ftp://11.1.11.1`
`mysql -u mydrive -h 11.1.11.1 -ptpassword < ldinsdocs.sql`
done)
$ mv * .txt hold/080501
$ cd..

(./cnvidtf.pl is already written in perl and the code is:
if ( $#ARGV < 0) {
die ("Need a file name, usage is cnvidtf FILENAME. \n");
}
$atab = "\t";
$infile = $ARG[0];
$output file = ">loadfile.seq";
open(Ifile, $infile) || die ("Could not open input file. \n \n");

foreach $line (<Ifile>){
$ofiledatline = $atab.$line;
print Ofile $ofiledataline;
}

close (Ifile);
close (Ofile);
Reply With Quote