How can I swap two Perl variables without using the third? -


i want swap 2 variables values without using third variable in perl, e. g.:

my $first = 10; $second = 20; 

please suggest me how can in perl in simple way.

the best way provide in 1 line can swap values:

 ($first, $second) = ($second, $first); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -