Does Perl parse its code left-to-right or right-to-left?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Akino877
    New Member
    • Nov 2007
    • 37

    Does Perl parse its code left-to-right or right-to-left?

    Hello,

    I would like to know if Perl parses its code in the left-to-right direction or right-to-left direction?

    Could someone please help me?

    Thank you,

    Akino
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    It depends on the statement. The real/full answer can be found by reviewing the internals of perl i.e., its C source code.

    Is there a practical reason for your question, or is this a question from a homework assignment?

    Comment

    • RonB
      Recognized Expert Contributor
      • Jun 2009
      • 589

      #3
      To understand how compound statements work it is common to read them from right to left, but that may or may not be the way perl parses the statement.

      Comment

      Working...