From: Elliot Holden <[EMAIL PROTECTED]>
> ok this is problem going to be real easy for one of you PERL gurus but 

It's either Perl (the language) or perl (the interpreter), there is 
no such thing as PERL.

> my little brain just can't figure it out. From the command line (Solaris 
>   9) I can do this fine:
> 
> echo my little test | mailx -s "Test Message" [EMAIL PROTECTED]
> 
> But in PERL the below code does not work:
> 
> system("echo my little test | mailx -s \"Test Message\" 
> [EMAIL PROTECTED]");

Use one of the many modules available from CPAN for sending email.
MIME::Lite, Mail::Sender, Mail::Mailer, Mail::Sendmail, ... to name 
just a few. It's possible that some of them are already installed.

> even if I just do:
> 
> system("mailx [EMAIL PROTECTED]");

If you 

  use strict;

you get an error that will make it clear that perl though you want to 
insert the contents of array @mydomain into the doublequoted string. 
You have to escape $ and @ in doublequoted strings, otherwise you do 
not get theliteral $ or @ but the contents of some variable. Or an 
error if you use strict and the variable was not declared.

HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to