sub foo { alias ($_[0] eq 'whatever' ? $_[1] : $_[2]) => my $x; ... }