Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: how ! operator works

by moritz (Cardinal)
on Feb 04, 2011 at 08:51 UTC ( #886157=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Scalar::Util qw/dualvar/;
    dualvar(0, '');
    
  2. or download this
    $ perl -wE 'say 1 + ""'
    Argument "" isn't numeric in addition (+) at -e line 1.
    1
    $ perl -MScalar::Util=dualvar -wE 'say dualvar(0, "") + 1'
    1
    
  3. or download this
    $ perl -MScalar::Util=dualvar -E 'my $x = dualvar(42, "23"); say $x; s
    +ay $x + 1'
    23
    43
    
  4. or download this
    perl -MDevel::Peek -MScalar::Util=dualvar -e 'Dump !1; Dump dualvar(0,
    + "")'
    SV = PVNV(0x254ff70) at 0x7409c0
    ...
      PV = 0x255f610 ""\0
      CUR = 0
      LEN = 8
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2016-10-01 17:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (3 votes). Check out past polls.