Hi guys,
I am converting a bash script to perl. I need lots of help and pointers on how to make the script work. Any help would be greatly appreciated. Here is what I have:
#!/usr/bin/perl
#Decrypt Files
$dir = "/usr/bin/gpg;
opendir(PGP_DIR, $dir) || die "can't opendir $dir: $!";
@pgp_files = grep { /pgp$/ && -f "$dir/$_" } readdir(PGP_DIR);
closedir(PGP_DIR);
for my $pgp_file (@pgp_files) {
my @output = `usr/bin/gpg --passphrase-fd 0 $pgp_file < .sunspot`;
#Move Decrypted files to pgps/End of Month Folder
move("pgp_file", "pgps/20080531") || die "move failed: $!";
#Change directory to txt
chdir "$idtdata/txts" || die "Can't change to $idtdata/txts: $!\n";
#Move text files
mv../*.txt .;
#Remove Database files
rmdir loadfile.seq;
#Update text files
$some_dir = " "
opendir(TXT_DIR, $dir) || die "can't opendir $some_dir: $!";
@txt_files = grep { /txt$/ && -f "$some_dir/$_" } readdir(TXT_DIR);
closedir(TXT_DIR);
for my $txt_file (@txt_files){
my @output = `./cvnidtf.pl $txt_file`
`curl -u mydrive
asswd --disable-epsv -T loadfile.seq ftp://11.1.11.1`
`mysql -u tdrive -h 11.1.11.1 -ppasswd < ldinsdocs.sql`;
#Move Updated text files to hold in Beginning of the month folder
move("txt_files", "hold/20080501") || die "move failed: $!";