Microsoft
Software
Hardware
Network
Question : perl, using parse_line to delimit by comma, but keep the double-quotes
I use parse_line to split a string based on comma (I don't have CSV library and do not want to install it), but I want to keep the double quote.
use Text::ParseWords;
my $mystring = "one, two, \"three\", four";
my $delim_char = ",";
my $delim_string = "\\s*$delim_char\\s*";
my @fields = &parse_line($delim_char,0,
$mystring)
;
print join("\n",@fields),"\n";
Answer : perl, using parse_line to delimit by comma, but keep the double-quotes
Put a 1 for the $keep variable (2nd parameter)
man Text::ParseWords explains the syntax of the below
my @fields = &parse_line($delim_char,1,
$mystring)
;
Random Solutions
Rehab Dell MD3000i or move to NetApp FAS2020 storage array?
How can I detect a pixel color of an image in Flash using ActionScript 2?
Sharing camcorder footage
Internet Explorer Nonfunctional After IE8 Upgrade
SBS2008 Folder redirections feature stability ?
The fool says in his heart ...
PDFs and iPads
Is there any way to limit what the users see in shared calendars in Exchange 2003 / Exchange 2007?
Using VLookup for Data Validation
WebService Client problem