Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: David Pea*** <davidjpea***@xxxxxxxx>
- Date: Mon, 08 May 2006 08:17:39 -0500
Henry Law wrote:
Paul Lalli wrote:
Same thing for warn() as for die() above. The line numbers are only
printed if you omit a terminating newline in your error/warning
message.
My total failure to know that is an interesting comment on how languages
are learnt. I don't think I've ever read up on "die"; early in the time
I was learning I saw it used, grasped the basic concept, and have coded
it the same way ever since; same for "warn". That the presence of a
terminating new line has an effect on how "die" and "warn" actually
behave isn't intuitive and I've never have thought to find out.
I guess I too could have done with reading the camel more carefully,
this is news to me also. :-)
From page 701, 3rd edition of The Camel, regarding die():
"If the final value of LIST does not end in a newline (and you're not
passing an exception object), the current script filename, line number
and input line number (if any) are appended to the message, as well as a
newline."
At the risk of sounding like I do part-time sales for O'Reilly, Henry, I
highly recommend that you get hold of a copy of Perl Best Practices by
Damian Conway. Mine arrived last week and I have not been able to put it
down. A lot of the advise given I find I already do, but the book is
literally filled with useful information like the above that has been
essentially bullet pointed for you with meaningful reasons as to why.
--
David Pea*** - davidjpea***@xxxxxxxx
.
- Follow-Ups:
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: clone . of . snake
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- References:
- MS SQL geek wants to jump ship, plz help on first Perl script
- From: clone . of . snake
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: Henry Law
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: Paul Lalli
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: Henry Law
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: Paul Lalli
- Re: MS SQL geek wants to jump ship, plz help on first Perl script
- From: Henry Law
- MS SQL geek wants to jump ship, plz help on first Perl script
- Prev by Date: FAQ 7.29 What does "bad interpreter" mean?
- Next by Date: Re: MS SQL geek wants to jump ship, plz help on first Perl script
- Previous by thread: Re: MS SQL geek wants to jump ship, plz help on first Perl script
- Next by thread: Re: MS SQL geek wants to jump ship, plz help on first Perl script
- Index(es):