Perl script to print out cars model and car color -
Text after "
I'm tying the car to make a Pearl script of the model and color printout, and the data is below. I want to know if there is anyway the car's model is moving in an area, so that I can print it any time I want to make? The data given below is a CSV file. The way I want to see data on a report is as well below
******** This is how the data looks ********
Chevy blue, 1 9 78 Washington Brown, 1 9 8 9, Dallas black, 2001, Queen's white, 2003 Manhattan Toyota red 2003, Bronx Green, 2004 Queens Brown, 2002, Brooklyn Black, 1999, Harlem
it *********** how I'm trying to get to see the data report * *********
A And Model: Toyota
Color: red Year: 2002 City: Queens
< Code> My $ FH, Opening '& lt;', 'File Name' or Die $! While (& lt; $ fh & gt;) {Next if / ^ \ s * $ /; My @ fields = partition /, /, $ _; Print ("Car Model: $ Field [0] \ n"), Next if @fields == 1; My Information; @data {qw (color year city)} = @ fields; Print "color: $ data {color} year: $ data {year} city: $ data {city} \ n"; }
Comments
Post a Comment