Created
October 31, 2011 23:52
-
-
Save kentfredric/1329436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["COLLOQ_TYPE", "COLLOQ_NAME", "COLLOQ_CODE", "XDATA"] | |
["S", "BELT,FAN", "003541547", undef] | |
["S", "BELT V,FAN", "000324244", undef] | |
["S", "SHROUD SPRING SCREW", "000868265", undef] | |
["S", "D REL VALVE ASSY", "000771881", undef] | |
["S", "YBELT,V", "000323030", undef] | |
["S", "YBELT,'V'", "000322933", undef] | |
[] | |
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.14.2; | |
use strict; | |
use warnings; | |
use Text::ParseWords; | |
use Data::Dump qw( pp ); | |
sub csv_split { | |
return [ quotewords ',' , 0, shift ]; | |
} | |
while (<DATA>) { | |
chomp; | |
pp csv_split( $_ ); | |
} | |
__DATA__ | |
COLLOQ_TYPE,COLLOQ_NAME,COLLOQ_CODE,XDATA | |
S,"BELT,FAN",003541547, | |
S,"BELT V,FAN",000324244, | |
S,SHROUD SPRING SCREW,000868265, | |
S,"D" REL VALVE ASSY,000771881, | |
S,"YBELT,"V"",000323030, | |
S,"YBELT,'V'",000322933, | |
S,"YBELT HAS A LINE | |
FEED IN IT",00000001, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment