in reply to Multi-roled colon

Neat. Didn't know Perl doesn't mind a lone colon.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Multi-roled colon
by Abigail-II (Bishop) on Oct 01, 2003 at 13:15 UTC
    Then you probably didn't know that that fact was actually documented? See "man perlrun", in the section that talks about the -S option. (It's amazing how many obscure Perl syntax/semantics issues are actually documented). Perl only ignores a lone colon if that colon is the first non-whitespace character in a file though.

    Abigail

      To wit, it says:

      ... a line containing just a colon, which will be politely ignored by Perl.
      It takes a twisted mind genius to read that and turn it into an obfu. Well done Abigail-II!

      My first guess was that it (the lone colon) was Perl implementing the null operator from the bourne family of shells and I couldn't think of any reason why they would have done that... clearly because they hadn't *grin*

      --
      Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho