Wednesday, 10th March 2010.

Posted on Sunday, 31st May 2009 by Balazs

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, [...]

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags:
Posted in Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

I found this info in the PostgreSQL archives. Here areĀ  2 methods:
Best method from Dan Lyke: Apache::DBI will pool across Perl programs, and you don’t have to change anything in your scripts.
Next best method from Gilles DAROLD: in your perl script use the following code
use vars qw($dbh);

$dbh ||= DBI::connect($datasrc, $dbuser, $dbpwd);
These can be use [...]

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags: , , , , ,
Posted in DB2, Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

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.

Share and Enjoy:

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags:
Posted in Perl | Comments (Comments)

Posted on Sunday, 31st May 2009 by Balazs

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’

Share and Enjoy:

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags:
Posted in Perl | Comments (Comments)

Posted on Wednesday, 7th January 2009 by Balazs

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

Share and Enjoy:

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags: , , ,
Posted in Perl | Comments (Comments)

Posted on Sunday, 4th January 2009 by Balazs

Perl announced a couple of weeks ago that it is switching from Perforce SCM to Git.  Is it time to review what SCM to use for managing distributed projects?

Share and Enjoy:

Share and Enjoy:
  • Print
  • LinkedIn
  • Facebook
  • FriendFeed
  • Twitter
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • Slashdot
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • RSS
  • Ping.fm
  • email
  • PDF

Tags: , , , , , ,
Posted in Perl | Comments (Comments)