In order to remove an element from the array or hash, we have to use the delete keyword on perl. Using the delete keyword on the key of the hash or array (numeric keyed hash), we can delete elements of a hash or array. Example ... read on
Net::MySQL is a simple MySQL perl Client to connect to MySQL servers. But Net::MySQL hangs if your result set is having just one row. Sample Net::MySQL code #!/usr/bin/perl use Net::MySQL; $mysql = Net::MySQL->new( hostname => 'localhost', database => 'db', user ... read on
unrecognized command line option "-fstack-protector" error usually comes on Cygwin when installing PERL modules. For example when installing the DBI module or DBD::MySQL perl module, the following error comes on cygwin : cp lib/DBI/Gofer/Serializer/Base.pm blib/lib/DBI/Gofer/Serializer/Base ... read on
When using PERL and WWW::Mechanize, your script can stop if there is some error in GETing a URL (such as 404 Not Found, 403 Permission Denied). Instead of resuming, the script terminates. If you want the script to continue resuming, you have to pass ... read on
The code below is a perl script that fetches the PNR status from the indianrail.gov.in website and displays it on the command line. Warning: No one is authorised to make any type of commercial usage like putting web advertisements or SMS service and ... read on
The following script sends SMS to any number in INDIA using the free service provided by Way2Sms.com Requires WWW::Mechanize and Compress::Zlib libraries. Please remember to fill the username and password in the fields that is mentioned in the script.
This is the script for sandeep when he asked me how to delete a directory in perl. rmdir function only removes empty directories. So we need to remove the contents of the directory before removing the directory. So if the directory contains more directories / folders ... read on