in reply to Ternary Operator for Multiple Arguments Passing

Because you've already shifted out ARGV[0] so ARGV[1] is now ARGV[0].

I'd be inclined to:

use strict; use warnings; my ($based_on, $top) = @ARGV; $based_on ||= 'tp'; $top ||= 1; print "$based_on $top\n";

which is fine so long as $top can't == 0


DWIM is Perl's answer to Gödel