Thursday, January 31, 2008
Convert ADCIRC grid to Tecplot data file
Wednesday, January 16, 2008
Mass substitution with Perl Command Line
For changing all occurrences of a several expression in a file, Perl with command line options can be very helpful. The following shows a pretty general example:
$> perl -i.bck -ep 's/search_term/replace_with/g' filename
The above command will check the "filename" file and, replace all occurences of "search_term" with the "replace_with" term. "-i" option tells Perl to backup the file with a ".bck" extension before any operation.
Monday, January 07, 2008
Manually install Perl modules with CPAN.pm
From your shell run
$> perl -MCPAN -e shell
command, it will ask you a few questions. Answer the questions, which are the basic settings for the local installation directory. You can set it up to a local directory within your home directory. Then simply type the following to install any module.
$> install Date
will install the latest Date module for Perl.
For further details see CPAN web site