in reply to Re^3: Accessing Arguments inside Subroutines via @_
in thread Accessing Arguments inside Subroutines via @_
Since perl can do multiple assignments in one swell foop, this would work too, avoiding the temporary variable:
sub swappy { ($_[0], $_[1]) = ($_[1], $_[0]) }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
---|