-t");
print SENDMAIL "Subject: $subject\n";
print SENDMAIL "From: $from\n";
print SENDMAIL "To: $to\n\n";
print SENDMAIL "Thank you for signing my guest book\.\n\n";
print SENDMAIL "-Lisa Neclos";
close (SENDMAIL);
}
# Start prints form res
I am getting the following error when trying to run this. I'm trying to
pass a hash as a reference to the subroutine.
ERROR - Type of Arg 1 to each must be hash (not private variable)
my $ref_hash ;
%hash = ("sky", "blue", "grass", "green", "apple", "red") ;
$ref_hash = \%hash ;
sub print {
wh
I am attempting to create a hash slice from a hash. The hash is:
%hash =("test1" => "test10",
"test2" => "test12" ,
"test3" => "test13")
I want the slice to include only the keys test1 and test3. How can I
accomplish this?
--