Slide 9 of 12
Notes:
perl -pe "s/(\w+)\s+(for|to)\s+(\w+)/<<$2 $3 $1>>/ig;" testfile.txt
Why does this not work as expected?
perl -pe "s/(\$\d+)/$100/g;" testfile.txt
Tell them about curly braces around vars to get:
perl -pe "s/(\$\d+)/${1}00/g;" testfile.txt
But then how to fix $000? How bout:
perl -pe "s/(\$\d{2,})/${1}00/g;" testfile.txt