perl tips     
Perl
To substitute text in files in place:
perl -p -i.bak -e 's/old_value/new_value/g;' (file filter)

To install CPAN modules:
perl -MCPAN -e 'install Chocolate::Belgian'

Use the CPAN shell:
perl -MCPAN -e 'shell'

To set values in the configuration (in the CPAN shell)
o conf urllist shift (removes the top value)
o conf urllist push 

To match a regex across multiple lines:
$string =~ m/(regex)/s;
   OR
undef $/
open( FILE, $name );
$file = <FILE>;
$file =~ m/(regex)/;

Updated Nov 13, 2004

# of readers
home
about me
blog archives
- docs
acroread
firefox
java
linux
mysql
perl
rpm
shell
vim
win

entertainment
experiences
funny lists
humor
intellectual
interests
mefi
music
opinions
photos
web designs
tools
webmaster help

Sign up
Enter your e-mail address below to be notified of new posts:






Search

  


Random quote
(View all quotes)
"I came, I saw, I had no idea what the heck was going on, I left."










Licensed under Creative Commons
(?) Choose theme:  X X X X X X


Loaded in 0.0080 seconds