Help for this page

Select Code to Download


  1. or download this
        # Use Perl code in strings...
        timethese($count, {
    ...
            'Name1' => sub { ...code1... },
            'Name2' => sub { ...code2... },
        });
    
  2. or download this
        my ($subcode, $subref);
        if (ref $c eq 'CODE') {
    ...
        $subcode = "sub { for (1 .. $n) { local \$_; package $pack; $c;} }
    +";
            $subref  = _doeval($subcode);
        }