in reply to Re: OO Inline::C - returning $self not working
in thread OO Inline::C - returning $self not working

No - a comment begins with the '#' and ends at the end of the line. (A semi-colon would be seen to be part of the comment.)

Cheers,
Rob
  • Comment on Re^2: OO Inline::C - returning $self not working

Replies are listed 'Best First'.
Re^3: OO Inline::C - returning $self not working
by Andrew_Levenson (Hermit) on Mar 08, 2006 at 14:12 UTC
    Thanks, but now that begs the question (from a newbie such as myself): If whitespace does not truly matter, how does the interpreter know when a line ends?
      If whitespace does not truly matter, how does the interpreter know when a line ends?
      Because its not absolutely true. 'perldoc perlsyn'
      Perl is a free-form language, you can format and indent it however you
      like. Whitespace mostly serves to separate tokens, unlike languages like
      Python where it is an important part of the syntax.

      ...

      Text from a "#" character until the end of the line is a comment, and is
      ignored. Exceptions include "#" inside a string or regular expression.

      update: perldoc perlintro'
      Comments start with a hash symbol and run to the end of the line
      # This is a comment
      Whitespace is irrelevant:
      print "Hello, world" ;

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

      A 'line' ends when the parser hits a newline ("\n") char.
      Statements, declarations and expressions end in ways appropriate to their "type" and context.