my @wanted = (extraction_function($string))[0, 1, 3]; my ($f1, $f2, undef, $f3) = extraction_function($string);