Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have tried all these below (in my subject part of this hash) and all of my attempts are not working:sub mal { my $webname = "first word"; return $webname; } use Mail::Sendmail; my %mail = ( To => 'you@hotmail.com', From => 'me@hotmail.com', Subject => mal(), #this gives me output in my ma +il subject of "first word" Message => "data here", );
I can not get this to work after many different tries at it. Please advise how I can get the hash part to accept additional words along with my mal() subroutine so it outputs in my subject part of the email:Subject => "mal() ,another word here", Subject => 'mal() ,"another word here', Subject => mal() 'another word here',
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Subroutine in a hash
by the_slycer (Chaplain) on Sep 19, 2002 at 18:57 UTC | |
by Anonymous Monk on Sep 20, 2002 at 10:36 UTC |