Help for this page

Select Code to Download


  1. or download this
    $ perl -MDevel::Peek -e'@a=qw( a b c ); sub { Dump($_[0]) }->( $#a );'
    SV = PVMG(0x1d36630) at 0x1cfcfd0
    ...
        MG_VIRTUAL = &PL_vtbl_arylen
        MG_TYPE = PERL_MAGIC_arylen(#)
        MG_OBJ = 0x1d07d10
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    print('max($x, 4)=', max($x, 4), "\n");
    print('$x=', $x, "\n");
    
  3. or download this
    $ perl a.pl 0
    max($x, 4)=4
    ...
    $ perl a.pl 1
    max($x, 4)=5
    $x=5