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
Migrating files/folders to a new domain
RPC through HTTP keeps prompting for pw on Exchange 2010
If table does not exist then
sp_helptext with schema
I need to accumulate the values in query
drop multiple DBs
100% CPU usage in vCenter but not in taskmanager on the Windows NT 4.0 VM that has been converted
Cisco CME - One DID to display its own number in caller ID
VBA for Excel - Calling a function from a dll - hanging - suggestions?
vbscript exit if file exists