Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^6: What technical benfits perl offers over python + few more questions. (generator/iterator/closure)

by LanX (Sage)
on Nov 13, 2021 at 20:20 UTC ( #11138797=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    while ( my ($val) = $iter->() ) {
        print "$val\n";
    }
    
  2. or download this
        
    C:/Strawberry/perl/bin\perl.exe -w d:/tmp/pm/generator_iterator.pl 
    5
    ...
    17
    
    Compilation finished at Sat Nov 13 21:18:20
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138797]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2022-05-16 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?