Perl: Base64 encoding a string

perl No Comments »

# perl -e 'use MIME::Base64; print encode_base64('mystring');'

OneLiners: Search and replace massive

perl No Comments »

find . -type f | xargs perl -pi -w -e ’s/iso-8859-1/UTF-8/g;’

add newline every n-th characters

perl No Comments »

# add newline every 60 characters

$var =~ s/(.{60})(?!n)/$1n/g if ($var);

create files

perl No Comments »

perl -e 'for ($i=1; $i < = 120; $i++) { $ret = `touch -t 20040816
1000 file$i` }'

DBI|DBD::Oracle and HP-UX

perl No Comments »

Bottom line: You need to recompile Perl with ‘-lcl’ and ‘-lpthread’ switches.

http://dbi.perl.org/
itrc forum
itrc forum #2
bottom line

After unpacking perl source you can build it with
$ sh Configure -des -Dprefix=/opt/local/perl- -Uinstallusrbinperl -A prepend:libswanted=’cl pthread ‘
$ make
$ make test
# make install

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in