From: "Rob Dixon" <[EMAIL PROTECTED]>
> "Leon Rosenstein" <[EMAIL PROTECTED]> wrote:
> >
> > I am having some problems with a script.
> >
> > Currently the script reads:
> >
> > opendir (DIR, "c:/temp") or die "Cant Open Temp Buddy Boy! \n";
> 
> Don't put \n on the end of a die string, otherwise the Perl
> interpreter won't tell you the line number of the failure.

Well it's good to know you'll get the line number and source file 
name if you omit the newline, but ... most often you do not want it 
there. What would you think of a program that responds to you with

        Cannot find file Foo.txt at script.pl line 26.

? Looks like the programm crashed, not that it just compains that the 
user entered an incorrect filename. If it's a message that's supposed 
to be seen by lusers you most probably do not want the source info 
appended.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to