解析行()
使用 Text::ParseWords 的 parse_line()
:
use 5.010;
use Text::ParseWords;
my $line = q{"a quoted, comma", word1, word2};
my @parsed = parse_line(',', 1, $line);
say for @parsed;
輸出:
"a quoted, comma"
word1
word2
使用 Text::ParseWords 的 parse_line()
:
use 5.010;
use Text::ParseWords;
my $line = q{"a quoted, comma", word1, word2};
my @parsed = parse_line(',', 1, $line);
say for @parsed;
輸出:
"a quoted, comma"
word1
word2