use strict; use warnings; use feature 'say'; my $csv = "a,b,c"; # split turns text into a list of pieces my @parts = split /,/, $csv; say scalar(@parts); say "@parts";
split on a pattern