Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Obfu Coroutines

by Limbic~Region (Chancellor)
on Aug 22, 2004 at 04:59 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found