in reply to Re: Re: What is your Perl dialect?
in thread What is your Perl dialect?

<plug>Why, what a perfect situation for Sub::Lexical</plug>

*Blush* I have meaning to check that out for a while... Ill have looksee when i get a minute. :-)

What situations do you find yourself using s///e? I can't say I've ever used it anything outside golf and obfu so where does it fit into your day-to-day coding?

I do a lot of data transformation type tasks. So it comes in useful quite regularly. Having said that I can't remember exactly where I used it last, but I do recall that I used it fairly recently.

---
demerphq


• Update:  
Heres an (untested) simplified example of where s///e comes in useful

$date=~s/^(\d+)-(\d+)-(\d+)$/sprintf('%04d/%02d/%02d',$1,$2,$3)/e or die "Failed to normalize date...";