George_Sherston has asked for the wisdom of the Perl Monks concerning the following question:
I'd be most grateful if anybody can tell me a neater way to do it. I feel this is something I ought to know - if so, I apologise for my ignorance!use Mail::Sendmail; my $Date = substr(gmtime $ref_event->{'EventStartDateTime'},0,10); my $SecID = int rand 16777216; my %m; # what I'd like to do except it doesn't work: %m = ( To => $ref_provider->{'ProviderEmail'}, From => 'management@trainingboard.co.uk', Subject => 'COURSE AVAILABILITY INQUIRY', Message => "We have received an inquiry about availability on the following course run by you:\n\n Course Title:\t\t\t $ref_course->{'CourseTitle'}\n \nCourse Date:\t\t\t$Date\n\n Number of Places Requested:\t\t $ref_booking->{'NumberOfAttendees'}\n\n Please confirm within 24 hours whether sufficient places are available (and if not, what alternatives there may be) by visiting the following site: http://www.trainingboard.co.uk/dmp/ $ref_provider->{'ProviderID'}/booking.pl? Action=Confirm Availability&BookingID= $ref->{'BookingID'}&SecID=$SecID", ); # what I am doing at present but hope to improve on: my $To = $ref_provider->{'ProviderEmail'}; my $Message = "We have received an inquiry about availability on the following course run by you:\n\n Course Title:\t\t\t $ref_course->{'CourseTitle'}\n \nCourse Date:\t\t\t$Date\n\n Number of Places Requested:\t\t $ref_booking->{'NumberOfAttendees'}\n\n Please confirm within 24 hours whether sufficient places are available (and if not, what alternatives there may be) by visiting the following site: http://www.trainingboard.co.uk/dmp/ $ref_provider->{'ProviderID'}/booking.pl? Action=Confirm Availability&BookingID= $ref->{'BookingID'}&SecID=$SecID"; %m = ( To => $To, From => 'management@trainingboard.co.uk', Subject => 'COURSE AVAILABILITY INQUIRY', Message => $Message, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing functions etc into hashes
by htoug (Deacon) on Sep 17, 2001 at 12:51 UTC | |
by George_Sherston (Vicar) on Sep 17, 2001 at 13:27 UTC | |
by tye (Sage) on Sep 18, 2001 at 03:54 UTC |