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 [...]
Parsing command-line arguments in Perl is very easy. All the command-line arguments are present in the array $ARGV. You can get the number of arguments passed as ( $#ARGV + 1 ). Below is a sample Perl script to read the command-line parameters.






