James Edward Gray II wrote: > On Mar 27, 2004, at 1:32 PM, R. Joseph Newton wrote: > > > It seems pretty clear to me, that although modular in their function, > > these Perl > > built-in variables were precisely designed to work with the warn and > > die > > functions. I'll hold with my essential point--that you get a lot more > > useful > > information out of your warning by havng the $! at the end of your > > custom > > message. > > You still sound pretty confused to me. ;)
> Fact: If the warn() message ends is a newline character, the line > number is not appended. > > Fact: This has nothing to do with ANY variables, it is the way warn() > is designed. I see. It does seem a bit quirky, though, to use whitespace in this way. I wasn't really aware of this oddity in the design of warn(). I guess it makes sense, somehow. It makes more sense, though, to just provide some context iformation, then get the more specific error or warning message ctained in the variable. Whatever the particular features that come and go with the choice of whitespace, it makes more sense to explicitly call for the information provided in $!. > > > Fact: This is the original question of this thread and what most of > the replies address. You might like to reread them at this point. > > Please run these two one liners, observing the differences in output, > for a good example of this: Sorry, they are non-portable: reetings! E:\d_drive\perlStuff>perl -e 'warn "Test Warning"' an't find string terminator "'" anywhere before EOF at -e line 1. > > > perl -e 'warn "Test Warning"' > > perl -e 'warn "Test Warning\n"' > > Hope that clears things up. > > James Got it. Nice point. Now back to business. You get a lot more information back by asking for information. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>