in reply to How to slice complicated string into an array

Hi, there is a nice old core module that could help.
use v5.14; use Text::ParseWords; my $line = q{"word1",word2,"word3,word4"}; my @words = quotewords( ",", 0, $line ); foreach( @words ){ say $_; }

Replies are listed 'Best First'.
Re^2: How to slice complicated string into an array
by Anonymous Monk on Feb 26, 2016 at 13:46 UTC
    Sorry for that post, I haven't seen poj's answer before.