Blog Category: Perl
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’
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.
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, […]
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.