Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to make bi-modal variables like $! ?

by bwana147 (Pilgrim)
on Jun 28, 2001 at 20:03 UTC ( #92339=note: print w/ replies, xml ) Need Help??


in reply to How to make bi-modal variables like $! ?

I don't know if that's at all possible. AFAIK, $! is magic, in the sense of internal perl magic.

You can try to work around with ^H. If your error messages are not meant for anything but displaying on a terminal, you can append a series of ^H after your digit to overwrite it, then the message, which won't change the numeric value. Not really helpfull in a log file, but it works on a term:

$error = "2\x08message"; print $error+0 . "\n"; print "$error\n";

HTH

--bwana147


Comment on Re: How to make bi-modal variables like $! ?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://92339]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2014-08-21 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls