Sometimes it is necessary to change a hardcoded path in all files in a given directory tree (i.e. if you migrated to a new home folder and need to change the paths to your libraries in all of your scripts).
This can be achieved extremely easily with some bash magic:
find . -type f | grep $PATTERN | xargs perl -pi -e "s|$OLD_PATH|$NEW_PATH|"
Showing posts with label perl. Show all posts
Showing posts with label perl. Show all posts
Saturday, April 16, 2011
Saturday, November 20, 2010
Installing Perl modules without root access
Installing Perl modules (especially through CPAN) without root access was used to be bit of a trouble. Even though CPAN shell works, you will need to configure it properly to install modules to your home folder, which is not always straightforward. But now there is an easy way to install perl modules locally, and that way is local::lib. This module sets up everything properly so you can install CPAN modules into your home folder easily.
Check out the local::lib installation walk through here and install all the CPAN modules with no trouble from now on.
Check out the local::lib installation walk through here and install all the CPAN modules with no trouble from now on.
Subscribe to:
Comments (Atom)