Skip to content

Blog Category: Perl

How to install Perl modules on a Unix / Linux server
Category: Perl Published: 2009-05-31

From the command line, as the root user, run: # perl -MCPAN -e shell And then at the cpan command line run: cpan> install Module::Name Alternatively, using sudo on one line, as any user you can directly intall a module by running: sudo perl -MCPAN -e ‘install Module::Name’

Check Variable Type is Integer in Perl
Category: Perl Published: 2009-01-07

If you need to make sure that data incoming from a data source is integer, you can use: if ( =~ m/^[d]*$/ ) { print “integern”; } More info is on SitePoint.

How to change a link everywhere throughout one or multiple websites?
Category: Perl Published: 2009-05-31

To do a recursive search and replace in a file system tree, the most effective way is to work directly on the file system. Using a tool like DreamWeaver is slow and cumbersome. Unix offers perl and find, which combined allow to do a search and replace recursively very easily. This implmentation is in perl, […]

Making Perl Module Fails on RedHat
Category: Perl Published: 2009-05-31

If the build fials because of a makefile error, it is most likely due to an encoding error during the generation of the makefile. That type of error is described in the RedHat Bugzilla report #87682 and the solution given is to change LANG from en_US.UTF8 to en_US.

© 2021, All rights reserved. | NewPush LLC. | newpush.com