in reply to Swapping two values

To swap those two values, it suffices to do
($blocks[$blockcount][4], $blocks[$blockcount][5]) = ($blocks[$blockcount][5], $blocks[$blockcount[4]);

Replies are listed 'Best First'.
Re: Re: Swapping two values
by jdporter (Paladin) on Feb 14, 2003 at 21:57 UTC
    @{$_}[4,5] = @{$_}[5,4] for $blocks[$blockcount];

    jdporter
    The 6th Rule of Perl Club is -- There is no Rule #6.