Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: something about improving code...by reptile (Monk) |
on Jun 28, 2000 at 02:30 UTC ( [id://20096]=note: print w/replies, xml ) | Need Help?? |
For your flip, you don't even need to use a reference. Modifying @_ in a subroutine also modifies the variables in the argument list. You could say this:
I'm not positive about this but AFAIK since that's a one line subroutine, perl will optomize by inlining the subroutine, and be even faster. Still, $foo = !$foo; isn't that hard to write directly. Whatever you prefer. 72656B636148206C72655020726568746F6E41207473754A
In Section
Seekers of Perl Wisdom
|
|