DB<22> p $_ = join "," , A..E A,B,C,D,E DB<23> p m/(,.*,)/ # longest possibility from first comma to last comma ,B,C,D, DB<24> p m/(,.*?,)/ # shortest possibility from first comma to next comma ,B, DB<25> p m/(,.*$)/ # longest possibility from first comma to end of line ,B,C,D,E DB<26> p m/(,.*?$)/ # shortest possibility from first comma to end of line ,B,C,D,E DB<27> #### DB<27> p m/(,[^,]*)$/ # comma followed by non-commas till EOL ,E #### DB<32> ; m/(,[^,]*) (?{say $1}) $/x #show all intermediate attempts to match $1 until it doesn't fail ,B , ,C , ,D , ,E DB<33> #### DB<34> ; m/(,[^,]*?) (?{say $1}) $/x #show all intermediate attempts to match $1 , ,B , ,C , ,D , ,E DB<35>