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
CentOS 5 mirroring/synchronization over internet for redundancy.
Error message when replying, sending, openning email in OWA
deployoing ecconect application
Windows Updates failing on SBS 2008 - WSUS installed on machine
Active Directory User
Javascript - output date and time
PL/SQL Procedure to insert CLOB data into Oracle Table
VLAN Configuring on a Powerconnect 5324
read 3 first characters of a string
Disable Driver Signature Enforcement during Windows 7 install