"Randy W. Sims" wrote:
> 
> On 3/27/2004 10:12 PM, John W. Krahn wrote:
> >
> > Did you know that $! is one of those "magical" variables that contains
> > both a number and a string at the same time!  AMAZING BUT TRUE!  Here is
> > an exerpt from the perl source:
> 
> I regret to inform you that you are correct :-/
> 
> perl -MDevel::Peek -e '$e=$!=2;print Dump($!)'
> 
> [snip]
> 
> I don't know where I got it from that strerror was called in an
> overriden stringization method, but I would have sworn to it until I saw
> your message. In fact, I /still/ believe it to be true... just in some
> other context: maybe a different variable? maybe it was ruby instead of
> perl? I *know* I got that from somewhere...

Well, if you are still using Perl version 1 then it is only a number,
but as of Perl version 2.0 up to and including the current version
(5.8.3) it is a number and a string.  Also note that the variable $^E
has the same property.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to