And in any sort of real production setting, you would find a CPAN module that incorporates the logic that you need to do, and your one-liner would use that. These approaches are interesting as "golf," but even the time spent redundantly doing as little as this could be considered waste. If "it" has been done (and done well ...) before, by anyone, don't do "it" again.