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
Linq and new features design in VS 2008
Icons and Start menu disappeared from desktop, running Windows 7 Home Edition on a Dell
psexec and copy file permissions
When I encrypt/encode a string using codeigniter encryption class, it is different everytime, why?
Sudden Laptop screen failure
dynamic httpbinding for web services
How do I upgrade firmware on Netgear wg103
Help setting up simple Isolated Wifi VLAN
Running .exe in a logon script
Network Device