in reply to Re^2: loop through values in a string and print " " around each value.
in thread loop through values in a string and print " " around each value.

If you only need the city and zip then:
while (<IN>){ next if /^#/; # extract $zip, leave line unmodified in $_ my ( $city, $zip ) = ( split /,/ )[ 0, 2 ]; tr/"//d for $city, $zip; if ( I want this zip code){ . . . } else{ push (@zips,$_); close(ZIPS); } }
  • Comment on Re^3: loop through values in a string and print " " around each value.
  • Download Code