use strict; use Text::CSV_XS; use Data::Dumper; my $csv = Text::CSV_XS->new({sep_char=>' '}); $csv->parse('one "two three" four five "six seven eight" nine'); my @columns = $csv->fields(); print Dumper(@columns);
The result is:
$VAR1 = 'one'; $VAR2 = 'two three'; $VAR3 = 'four'; $VAR4 = 'five'; $VAR5 = 'six seven eight'; $VAR6 = 'nine';
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: In need of a stupid regex trick
by CountZero
in thread In need of a stupid regex trick
by 87C751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |