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.
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.
#!/usr/bin/perl
use Net::MySQL;
$mysql = Net::MySQL->new(
hostname => 'localhost',
database => 'db',
user => 'user',
password = …
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.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBI/Gofer/Execute.pm blib/lib/DBI/Gofer/Execute.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp …
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
autocheck …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 Reproducing/Transmitting/Storing in …
read onThe 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 / …
read on