in reply to At which line number did the print statement occure?

__LINE__ and friends should be documented in perlvar as well as perldata. perlvar is the logical place to look for this functionality.
  • Comment on Re: At which line number did the print statement occure?

Replies are listed 'Best First'.
Re^2: At which line number did the print statement occure?
by jrockway (Acolyte) on Oct 16, 2006 at 02:42 UTC
    They're data, not variables. (Vary as in change.) Plus, they look a lot like __DATA__ and __END__, which are documented in perldata.
      It's worth noting that the function caller, when used in Windows, returns the line from the first line of actual code.

      #! /usr/bin/perl -w foo() ; sub foo{ print join(" ", caller); }
      This will print '3' as the line number on my Windows machine.
      Bro. Doug :wq