in reply to Re^3: Overzealous considerations and broken mechanisms.
in thread Overzealous considerations and broken mechanisms.

The title is certainly odd (iterating over a single item?).

I guess we come from different backgrounds. I've never seen a string as a "single item".

I can't think of any language that doesn't allow you to iterate over a string.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"
  • Comment on Re^4: Overzealous considerations and broken mechanisms.

Replies are listed 'Best First'.
Re^5: Overzealous considerations and broken mechanisms.
by Argel (Prior) on Apr 09, 2010 at 19:29 UTC
    I can relate, but in Perl a string is a scalar.

    Elda Taluta; Sarks Sark; Ark Arks

      And @a is an array. But you can still iterate over it!


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Yeah, but it's not like this is C where a char is really a shorthand for pointers. Or C++ where a string is likely implemented as a class. In Perl a string is scalar and if you want to do soemthing with a portion of the contents you have to use special funcions, regex's, etc. Well, I suppose you could also split each character out. So what happens if the elements in @a are strings?

        Elda Taluta; Sarks Sark; Ark Arks