I want to swap two variables values without using the third variable in Perl, e. g.:
my $first = 10; my $second = 20;
Please suggest me how
You can write:
($first, $second) = ($second, $first);
(See §3.4 "List Assignment" in Learning Perl, Third Edition.)