in reply to use Shell

I do not know the Shell module, but the syntax error is in the call to $sh->mail: all text should be inside quotes, and you should (probably) use parentheses as well, for example:
$sh->mail('-s', "hi", 'sharath@gmail.com')


Just for 'fun' I tried this code and, guess what? It ran the mail program.

Replies are listed 'Best First'.
Re^2: use Shell
by Khen1950fx (Canon) on Mar 09, 2010 at 09:57 UTC
    That's strange. Just for fun, I used your idea and tried this. It works.
    #!/usr/bin/perl use strict; use warnings; use Shell qw(mail); my $sh = Shell->new; mail('-d');