in reply to clearing spaces from data input
jryan's code is careful to remove only spaces next to commas. But if you want to remove all spaces, s/ //g; is what you want. Well, it's what I would want, anyway...$line = "s1:a,first,b, second, c,third"; $line =~ s/ //g; #print $line;
|
|---|