my $condition = int rand 2; my ( @array1, @array2 ); my $stuff = "This, that, and the other"; push( ( $condition ? @array1 : @array2 ), $stuff );