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

Do you mean something like:

print qq{"$_"\n} for @zips;

DWIM is Perl's answer to Gödel
  • Comment on Re: loop through values in a string and print " " around each value.
  • Download Code

Replies are listed 'Best First'.
Re^2: loop through values in a string and print " " around each value.
by kevyt (Scribe) on Jan 12, 2007 at 02:15 UTC
    Oh my gosh... That's so awesome !!! lol... I need to look up "qq" Thanks a bunch !!!! This is so clean and perfect!

      The following are all the same:
      "..."
      qq{...}
      qq(...)
      qq!...!
      qq!...!
      etc

      qq is just a double-quoted string, without using double quotes.

      qq{"bla"}
      is easier to read than
      "\"bla\""

        oh, thanks !
      oops, this did not work... I need the " " around every line:
      "Leesville,TX,78122,830,48177,Gonzales,P,"
      vs
      "Leesville","TX","78122","830","48177","Gonzales","P",