guestbook problems

2001-12-17 Thread Lisa Neclos
-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

can't use reference to hash in subroutine?

2001-11-08 Thread Lisa Neclos
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

create hash slice from hash

2001-10-31 Thread Lisa Neclos
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? --