in reply to Re: inplace editing code in scriptin thread inplace editing code in script
B::Deparse is a module you can use to convert Perl oneliners into code that you can use in scripts. I'm not sure what else there is to explain between the usage example I've shown and the documentation I've linked to.