Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

sauoq's scratchpad

by sauoq (Abbot)
on Jun 03, 2004 at 16:33 UTC ( #360256=scratchpad: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        $out .= $txt;
        print Text::Wrap::wrap('', ' ' x $indent, $out), "\n";
    }
    
  2. or download this
    {
        my $c = 0; 
    ...
    print ${counter()}, "\n" for 1..3;
    ${counter()} = 99; 
    print ${counter()}, "\n" for 1..3;
    
  3. or download this
    # Use a sub to generate closures to be used as settable counters.
    sub new_counter {
    ...
    print '$c2: ' . ${&$c2}, "\n" for 1..3;
    ${&$c2} = 99;
    print '$c2: ' . ${&$c2}, "\n" for 1..3;
    
  4. or download this
     
    sub new_lvalue_counter { 
        my $c = 0; 
    ...
    print &$c3, "\n" for 1..3;
    &$c3 = 10;
    print &$c3, "\n" for 1..3;
    
  5. or download this
    {
        my @c;
    ...
    counter(1) = 100;
    print counter(0), "\n";
    print counter(1), "\n";
    
  6. or download this
    #!/usr/bin/perl -wl
    use strict;
    ...
    print /$pattern/ ? '   ': 'no ', "match: '$_'" for @good;
    print 'BAD Tests';
    print /$pattern/ ? '   ': 'no ', "match: '$_'" for @bad;
    
  7. or download this
     
    GOOD Tests
       match: '0e0'
    ...
       match: '1.1a'
       match: '1a.1'
       match: '1.a1'
    
  8. or download this
    <S_Shrum> our?  never seen that one...Kewl...I'll research and impleme
    +nt if
              that does the trick...thanks
    ...
    <theorbtwo> Yes, [kodo|sir]!  Not that she hasn't been trying, sir!
    * castaway .oO( gone .. )
    <djantzen> [sauoq] is not and never has been a troll [merlyn].
    
  9. or download this
    ...
    
    ...
    <sauoq> [Corion] Sshh... don't tell anyone else I'm not gnat... I woul
    +dn't
            want that to get around. ;-)
    * sauoq chuckles.
    

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 cooling their heels in the Monastery: (11)
As of 2014-07-29 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (225 votes), past polls