Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^7: Trouble emailing zip file

by AnomalousMonk (Bishop)
on Jul 04, 2018 at 22:47 UTC ( #1217915=note: print w/replies, xml ) Need Help??


in reply to Re^6: Trouble emailing zip file
in thread Trouble emailing zip file

still getting the same error ...

If by "... the same error ..." you mean
    Can't exec "/usr/bin/mailx uuencode $zipfile $zipfile -r -s": No such file or directory at ...
then you haven't read and/or understood poj's reply.

Use double-quotes to interpolate the  $zipfile string into the  $emailcmd string:

c:\@Work\Perl\monks>perl -wMstrict -le "my $home = $ENV{'HOME'}; print qq{>$home<}; ;; my $zipfile = qq{$home/file.zip}; print qq{>>$zipfile<<}; ;; my $emailcmd = qq{/usr/bin/mailx uuencode $zipfile $zipfile -r -s}; print qq{>>>$emailcmd<<<}; " >IsWhereTheHeartIs< >>IsWhereTheHeartIs/file.zip<< >>>/usr/bin/mailx uuencode IsWhereTheHeartIs/file.zip IsWhereTheHeartI +s/file.zip -r -s<<<
Maybe see discussion of  qq// et al and interpolation in perlop. (Basic problem is with string interpolation and not with existence of a file.)


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1217915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2019-12-07 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (161 votes). Check out past polls.

    Notices?