in reply to dealing with whitespace and using chop when reading delimited files
Why did noone (yet) noticed the more serious bug in this code:
($quote, $time) = split (",", $_);The first argument to split is a regex.
chomp; my ($quote, $time) = split m/\s*,\s*/, $_, 2; $quote = sprintf "%.3f", $quote;
|
|---|