http://www.perlmonks.org?node_id=197062


in reply to Re: Timestamp as a Filename Collection
in thread Timestamp as a Filename Collection

I am looking closely. You're using an anonymous sub, therefore you're taking a closure. Use perl -D8 if you don't believe me. (Look for the anoncode op.)

It's true that your code is compiled at compile time. I said you were taking a closure, not eval'ing a string. Anyways, the {my @time = ...} sub is also compiled at compile time. That code should be faster because it does less -- allocating a frame (pad) vs. allocating an empty frame, taking a closure and calling it.

You should be happy the simple stuff is getting faster, instead of sad that the obfu code is slower!