Go Back to Blog Posts

title: “[Trenches tip] The most handiest Perl one liner I teach”

date: 2011-03-05

One of my favourite little tricks to teach.  Comes in especially handy when you want to do huge changes on database dumps.

perl -i -p -e “s/text_to_change/text_to_change_to/g;” filename.txt

For the days when your text editor can’t open a 50mb file.