in reply to Re^4: Formatting dates while parsing CSV
in thread Add leading zeros to days/months in dates while parsing CSV
$ perl -wE 'say for ()[2, 1, 0]' $ perl -wE 'say for ("a")[2, 1, 0]' Use of uninitialized value in say at -e line 1. Use of uninitialized value in say at -e line 1. a
Easy fix: supply the missing fields:
$_ = sprintf '%04d-%02d-%02d', ((split m:/:), (0) x 3)[ 2, 0, 1 ] for +@fields[ 10, 14, 24, 26 ];
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Formatting dates while parsing CSV
by BigRedEO (Acolyte) on Jun 14, 2016 at 15:50 UTC | |
by soonix (Chancellor) on Jun 14, 2016 at 20:32 UTC |