You could use the __LINE__ directive in your error handler.
-----Original Message----- From: Amit Saxena [mailto:[EMAIL PROTECTED] Sent: 16 July 2008 11:25 To: Amit Koren Cc: beginners@perl.org Subject: Re: A newbie question - line number inside the script On Wed, Jul 16, 2008 at 3:52 PM, Amit Koren <[EMAIL PROTECTED]> wrote: > Hi list. > > I'm a newbie to Perl, (and to this mailing list) :) > There's a task i was given, in which it is necessary to get the > number of the current executing line/command - inside the script itself. > > Can someone assist please ? > > Thanks in advance, > > Amit. > If you are referring to process ID by "number", you can use $$ for that. Regards, Amit Saxena Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trade marks of British Sky Broadcasting Group plc and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky Interactive Limited (Registration No. 3554332), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/