Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 chilling in the Monastery: (2)
As of 2014-09-21 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls