in reply to Extracting data from a 2D array

Sure, use the m//m operator/modifier:
my @lastNames = $data =~ m{^[^,]+,([^,]+)}gm;
This gets the second field from each line.