in reply to Re: Explanation of commonly used Perl
in thread Explanation of commonly used Perl

In my opinion, your translation is a whole lot easier to read and probably a better idea for maintainable code. The original is pretty obfuscated and would definitely confuse a beginner.
  • Comment on Re: Re: Explanation of commonly used Perl

Replies are listed 'Best First'.
Re: Re: Re: Explanation of commonly used Perl
by Chmrr (Vicar) on Apr 16, 2002 at 22:30 UTC

    I would agree. The only "advantage" to doing the hashref / dereference / slice trick is that one avoids the %args hash; frankly, I don't consider that an advantage at all. Most of the time when I pass args to a function as a hash, I simply use the %args hash in the function, instead of pulling specific values out and stuffing them into scalars. I like to think that this makes for better maintainability and scalability.

    But to each their own..

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'