Help for this page

Select Code to Download


  1. or download this
    use Devel::Peek;
    my $x = "abc";
    Dump $x; # here $x is not magic
    $x =~ /./g;
    Dump $x; # now it is
    
  2. or download this
    #define tryAMAGICbin_MG(method, flags) STMT_START { \
        if ( ((SvFLAGS(TOPm1s)|SvFLAGS(TOPs)) & (SVf_ROK|SVs_GMG)) \
            && Perl_try_amagic_bin(aTHX_ method, flags)) \
            return NORMAL; \
        } STMT_END
    
  3. or download this
    my $x = 1; my $y = 2; my $z;
    for (1..1000) {
        $z = $x + $y;
    }