Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Don Coyote's scratchpad

by Don Coyote (Pilgrim)
on Jul 01, 2010 at 17:29 UTC ( #847567=scratchpad: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # example of pass by reference
    
  2. or download this
    # bless $var;
    
  3. or download this
    $arrvar->[0]; # deref array element access
    $arrvar->{'anoint'}; # deref hash element access 
    $arrvar->subroutine; # deref subroutine call
    
  4. or download this
    $arrvar->subroutine; # deref subroutine call
    
  5. or download this
    sub iexpectanarraycontainingdataaboutaccuracy{
    
    ...
     return 1;
    
    }
    
  6. or download this
    #!perl
    
    ...
    }
    
    exit (0);
    
  7. or download this
    unless(eval{ $arrayref->can(maxstr) }){
      carp $@
    ...
      $arrayref->maxstr()
    }
    # carps
    
  8. or download this
    #!perl
    
    ...
    }
    
    exit; #(?) :D
    
  9. or download this
    windos% perl -Mv5.20 -Mstrict -MConfig -w -e "say $Config{versiononly}
    +" 
    
  10. or download this
    #!perl 
    
    ...
    open my $fh, '>', '.\configlist.txt' or die $!;
    print {$fh} config_sh(); 
    close $fh;
    
  11. or download this
    sub donotrun_this_is_an_example{
      
    ...
    
    return Soan & $bitmask;
    }
    
  12. or download this
    perl -pi.bak -e "
    
    ...
    s/(<.*?CIT-)(\w+)(-\w\d+.*?>)/"$1$2".$nameshash->{$2}++."$3"/ge;
                  
    " bibliofile
    
  13. or download this
    my %combinations = ( 
              co1 => [
    ...
        }
    
    }
    
  14. or download this
    %combinations = ( 
              co1 => [
    ...
              us2 => [ qw(one two three five seven) ],
              us3 => [ qw(one one two three five) ],
              );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2015-08-01 21:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found
    past polls