join '/', 'foo', 'bar', $baz, 'quux', ( @qux ) x!! $somecond, $wibble, $wobble; # vs join '/', map { defined $_->[-1] ? $_->[0] : () } ( [ 'foo' ], [ 'bar' ], [ $baz ], [ 'quux' ], [ @qux, $somecond ], [ $wibble ], [ $wobble ], );