use strict; use warnings; use v5.12; (my $first,undef)=split /,/,'foo,bar',2; say $first;