Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Obfu Coroutines

by Limbic~Region (Chancellor)
on Aug 22, 2004 at 04:59 UTC ( #384885=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Iterator;
    sub TIESCALAR { bless $_[1], $_[0] }
    ...
    sub add_section { push @{ $_[0]->[0][2] } , $_[1] }
    sub create { my $s = shift; return sub { $s->[0][2][ $s->[0][0] ]->($s
    +, @_) } }
    42;
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print $wacky->(), "\n";
    print $wacky->(), "\n";
    print $wacky->(), "\n";
    
  3. or download this
    coroutine create {
        my $foo = shift;
    ...
    44|weird
    The end is near - goodbye cruel world
    0
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://384885]
Approved by adrianh
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2022-05-19 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?