vboy1997 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: anyway to make this look better
by JavaFan (Canon) on May 18, 2011 at 21:35 UTC
    no warnings; $addresses[1-1][my $foo][""];
    Better?
Re: anyway to make this look better
by cdarke (Prior) on May 19, 2011 at 07:36 UTC
    In this particular case, the Perl notation is the same as almost all other programming languages, with the exception of the leading $.

    Or are you just wanting to write Perl as if it was some other language that you know better? That's not a good strategy for learning a language.
Re: anyway to make this look better
by ikegami (Patriarch) on May 18, 2011 at 21:31 UTC
    What isn't clear to you?
      I meant like using arrows
Re: anyway to make this look better
by John M. Dlugosz (Monsignor) on May 19, 2011 at 16:52 UTC
    tchrist would probably agree that $addresses[🙈][🙉][🙊] looks pretty, but you probably can't get it to compile without a source filter or patch.

    Note: try the Symbola font if you can't see that.

      tchrist would probably agree that $addresses[🙈][🙉][🙊] looks pretty, but you probably can't get it to compile without a source filter or patch.
      The biggest problem is that those aren’t even identifier characters:
      % uniprops 1F648 1F649 1F64A
      U+1F648 ‹🙈› \N{SEE-NO-EVIL MONKEY}
          \pS \p{So}
          All Any Assigned InEmoticons Common Zyyy Emoticons So S Gr_Base
             Grapheme_Base Graph GrBase Other_Symbol Print Symbol X_POSIX_Graph
             X_POSIX_Print
      U+1F649 ‹🙉› \N{HEAR-NO-EVIL MONKEY}
          \pS \p{So}
          All Any Assigned InEmoticons Common Zyyy Emoticons So S Gr_Base
             Grapheme_Base Graph GrBase Other_Symbol Print Symbol X_POSIX_Graph
             X_POSIX_Print
      U+1F64A ‹🙊› \N{SPEAK-NO-EVIL MONKEY}
          \pS \p{So}
          All Any Assigned InEmoticons Common Zyyy Emoticons So S Gr_Base
             Grapheme_Base Graph GrBase Other_Symbol Print Symbol X_POSIX_Graph
             X_POSIX_Print
      
      And Perl isn’t fond of random symbols appearing where it is expecting a TERM.
        I know. They are not letters.

        It's an academic difference though. No reason why a language couldn't include them for whatever purpose it wants. In fact, because they are not part of any existing words, it makes it easy to grab them to use for some hot-wired specific purpose, like a single-character constant.

        I have a dim memory of musing over that with the Perl6 people, as characters for constants or as part of user-defined operators were often classified wrong for the intended purpose. So it needs a way to specify, lexically, such a classification as well.

        A source filter could easily expand odd characters into something else, such as a legal identifier name. Because they are abnormal, it stands a good chance of not messing up the rest of the file as filters are wont to do.

        It would be interesting to see if anyone could get it to compile in 5.14 without a source filter. Perhaps munging the unicode database, perhaps other tricks I don't know about, perhaps some combination of overloads and other junk.

Re: anyway to make this look better
by Mr. Muskrat (Canon) on May 19, 2011 at 19:00 UTC

    <tongue-in-cheek>Get some (new) glasses.</tongue-in-cheek>