in reply to Re: How to put email addresses in a variable and send mails via mailx command
in thread How to put email addresses in a variable and send mails via mailx command

... or use explicit string concatenation, which is messier IMHO, but should work just as well:
    open(MAILPIPE,'|/bin/mailx -s "Happy Birthday" ' . $email) or die "Can't open pipe $!";


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

Replies are listed 'Best First'.
Re^3: How to put email addresses in a variable and send mails via mailx command
by Anonymous Monk on Dec 24, 2015 at 21:45 UTC

    but should work just as well:

    both versions are vulnerable to shell interpolation

      both versions are vulnerable to shell interpolation

      How so? Can you please give an example?


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