in reply to The maybe it is better written this way tool

Change split / /, $var to split ' ', $var

Replies are listed 'Best First'.
Re^2: The maybe it is better written this way tool
by ikegami (Patriarch) on Nov 14, 2009 at 22:11 UTC
    On the same note, split '...' is more readable as split /.../, since the first arg of split is a regex pattern. (split ' ' excepted, of course.) We often get questions about split '|'.
      > On the same note, split '...' is more readable as split /.../, since the first arg of split is a regex pattern. (split ' ' excepted, of course.) We often get questions about split '|'.

      I don't understand, don't you mean it the other way round?

      IMHO since /.../ clearly shows that it's a regex it should better always be written like that.

      '...' misleadingly looks like a simple string.

      Cheers Rolf

        I said "more readable as", not "more readable than". You said the same thing I did.