kevyt has asked for the wisdom of the Perl Monks concerning the following question:
The code reads in the file and removes the quotes and the carriage return."Anawalt","WV","24808","304","54047","McDowell","P", "Anch","AK","99505","907","02020","Anchorage","N", "Ancho","NM","88301","505","35027","Lincoln","A", "Anchor","IL","61720","309","17113","McLean","P", "Anchor","MS","39776","662","28017","Chickasaw","N",
while (<IN>){ next if (/^#/); chomp; tr/\"//d; y($city,$state,$zip,$area_code,$fips,$county,$pref,$type) = split ( +/\,/); if ( I want this zip code){ . . . } else{ push (@zips,$_); close(ZIPS); } } #### The question is for the print below #### How can I print " around each value foreach (@zips){ print ; }
|
|---|