#!perl -wl use strict; my ($x, $y, $z) = ([0..1], [0..2], [0..3]); my ($longest) = sort { $#$b <=> $#$a }($x, $y, $z); print "@$longest";