in reply to line number

Check it out:

print "blah\n"; print __LINE__,"\n"; print "blah\n"; print "blah\n"; print "blah\n"; print "blah\n"; print "blah\n"; print __LINE__,"\n";
when run gives you
blah 2 blah blah blah blah blah 8

What other information are you looking for?


Peter L. Berghold -- Unix Professional
Peter at Berghold dot Net
   Dog trainer, dog agility exhibitor, brewer of fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and a good Belgian ale in your chalice.

Replies are listed 'Best First'.
Re: Re: line number
by meetraz (Hermit) on Mar 01, 2004 at 22:17 UTC
    If your code is split into multiple files, it will also help to use __FILE__ , like this:

    print "Error at line " . __LINE__ . " in file " . __FILE__ . "\n";

Re: Re: line number
by Anonymous Monk on Mar 01, 2004 at 20:46 UTC
    meant to reply here....see above