use Data::Dump qw(dump); my $s= 'a,b, this is the rest of the string, dude!'; my @results= split(/,/, $s); print dump \@results;