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
Post a Comment