in reply to hash question
my $sched = new Schedule::Oncall; # Declare here: my (@sched, $oncall, %info, $person, $pemail, $fname, $emailaddy); #open(SESAME, "sbur.sched.$wunm"); if ( defined(open(SESAME, "sbur.sched.$wnum")) ) { # Don't declare them here, just use them: @sched = $sched->load ("file" => "sbur.sched.$wnum"); $oncall = $sched->oncall (time); %info = $sched->info ("$oncall"); $person = $sched->oncall (time); $pemail = $info{pager}->[0]; # assigned oncall pager email $fname = $info{fullname}->[0,1]; # assigns the full name of wh +o's oncall $emailaddy = $info{email}->[0]; # assigns the email of who's o +ncall } else { print "There isn't a sched file defined!\n"; } my %mail = ( To => "$fname <$emailaddy>", From => 'oncall script <oncall.pl@dcx.com>', Subject => 'Test message yepper', 'X-Mailer' => "Mail::Sendmail version $Mail::Sendmail::VERSION +", );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash question
by ikegami (Patriarch) on Jun 29, 2006 at 15:36 UTC | |
|
Re^2: hash question
by Akhenaton (Initiate) on Jun 29, 2006 at 14:47 UTC |