His full example script:
my $line = '1|firstname|last, name|address1|city|state|zip'; my @stuff = split(/\|/,$line); for (@stuff) { if (/,/) { $_ = qq~"$_"~; } } my $csv = join ',' ,@stuff; print $csv;
In reply to What does $_ = qq~"$_"~ do? by mkj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |