Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

choroba's scratchpad

by choroba (Chancellor)
on Apr 02, 2010 at 15:13 UTC ( #832496=scratchpad: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    use strict;
    ...
    tie my @array, 'Array::Stretch';
    @array = qw(a b c);
    $array[-1] = 'A';
    
  2. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    }
    
    main();
    
  3. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    say 'utf8'  if $o_utf8 =~ /$valid/;
    
    say 'yup' if "\x82" =~ /$valid/; # chr 130
    
  4. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    say $o->get_name;
    eval {$o->new; 1} or warn $@;
    eval {'Named'->get_name; 1} or warn $@;
    
  5. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    tie my $p, 'Previous';
    $p = $_ for 'a' .. 'z';
    
  6. or download this
    #! /usr/bin/perl
    use warnings;
    use strict;
    ...
        print $t->ymd, "\n" if is_magical(join q(), $t->mon, $t->mday, $t-
    +>year);
        $t = $t + ONE_DAY;
    }
    
  7. or download this
    (1)$ perl -MO=Deparse -e 'do("foo")->{bar};'
    do $foo{'bar'};
    -e syntax OK
    ...
    use strict 'refs';
    do('foo')->{'bar'};
    -e syntax OK
    
  8. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    my %uniq;
    undef @uniq{@separators};
    say 1 == keys %uniq ? 'Same' : 'Different';
    
  9. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    }
    
    print Dumper \@result;
    

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 wandering the Monastery: (7)
As of 2016-05-02 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?