Perl Language Split a string on unquoted separators parse_line()

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Using parse_line() of Text::ParseWords:

use 5.010;
use Text::ParseWords;

my $line = q{"a quoted, comma", word1, word2};
my @parsed = parse_line(',', 1, $line);
say for @parsed;

Output:

"a quoted, comma"
 word1
 word2


Got any Perl Language Question?