Process and array or a hash inside a perl template #Print an Array named items [% FOREACH item IN items -%] [% item %] [% END -%] #Print a HASH named items [% FOREACH key IN items.keys.sort -%] [% key %]: [% terms.$key %] [% END -%] Enjoy coding!
Below is a perl function that i wrote to print a HASH completely. What i mean by ‘completely’ is that it will expand all hashes and arrays found within the given HASH. sub print_hash { my ($hash,$str) = @_; while( my ($k, $v) = each %{$hash}) { print $str."$k => $v\n"; if( $v =~ /hash/i [...]
This is a tutorial on how to send mails to multiple recipients using Perl Net::SMTP module with authentication. The smtp module implements a client interface to the SMTP and ESMTP protocol, enabling a perl5 application to talk to SMTP servers. The first step is to create a SMTP connection to the server. A new Net::SMTP [...]





