|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^2: Recursive search and deleteby tobyink (Prior) |
| on Nov 16, 2012 at 13:03 UTC ( #1004182=note: print w/ replies, xml ) | Need Help?? |
|
One nifty trick I sometimes use in situations like that is to make my script output text like this to STDOUT:
Then when I've played with it a few times, and I'm confident it's outputting the right commands, pipe the output into sh:
This is also good if you need to do a bunch of complex database changes. Just write SQL to STDOUT, and once you're sure it's OK, pipe it into your favourite command-line SQL tool.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||