viperl has asked for the wisdom of the Perl Monks concerning the following question:
The error i am getting is "Error - sh: line 1: abc@gmail.com: command not found"$fileName = 'viper'; $main::mailTemplate = '/main/etc/mailtemplate.txt' $main::outputDir = '/main/attachments'; $main::delAddress = 'abc@gmail.com'; chdir $main::outputDir or die "can't cd"; @files = `ls|grep $fileName`; foreach(@files) { $main::delFileName = $_; print $main::delFileName; #prints the correct file name my $result = `cat $main::mailTemplate|mutt -s "TITLE OF MAIL" -a $main +::outputDir\/$main::delFileName $main::delAddress`; }
$main::mailTemplate = '/main/etc/mailtemplate.txt' $main::outputDir = '/main/attachments'; $main::delAddress = 'abc@gmail.com' $main::delFileName = 'viper1.csv'; my $result = `cat $main::mailTemplate|mutt -s "MAIL TITLE" -a $main::o +utputDir\/$main::delFileName $main::delAddress`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mailing Using Perl
by NetWallah (Canon) on Jun 12, 2009 at 05:38 UTC | |
|
Re: Mailing Using Perl
by cdarke (Prior) on Jun 12, 2009 at 07:15 UTC |