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

I dont know why I did not see this... This is a good solution. Save it as a var before I change it. Then push onto an array. Then loop through the array and print it.
while ( <IN> ){ $str = $_; #### I added this chomp; tr/\"//d; if (/^#/){ ### added this push (@zips,$_); next; } if (I want this location){ . . . } else{ push (@zips,$str); } } # while foreach (@zips){ print ; }
  • Comment on Re^2: loop through values in a string and print " " around each value.
  • Download Code