Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: At which line number did the print statement occure?

by jrockway (Acolyte)
on Oct 16, 2006 at 02:42 UTC ( [id://578425]=note: print w/replies, xml ) Need Help??


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

They're data, not variables. (Vary as in change.) Plus, they look a lot like __DATA__ and __END__, which are documented in perldata.
  • Comment on Re^2: At which line number did the print statement occure?

Replies are listed 'Best First'.
Re^3: At which line number did the print statement occure?
by Bro. Doug (Monk) on Oct 17, 2006 at 23:51 UTC
    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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://578425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-19 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found