Hopefully this plain-text illustration is clear enough to highlight the problem with your second examaple.
system("/bin/mailx -s "hello" john@work.com"); ^ ^ ^ ^ ^ | | | | | quote | | quote unquote | bareword unquote
It ought to be a "bareword found where operator expected" error.
Dave
In reply to Re: can't get mailx to send from within a script
by davido
in thread can't get mailx to send from within a script
by Adrian
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |