from exegesis 4:

        In Perl 6, the current topic -- whatever its name and however
        you make it the topic -- is always aliased to $_.

and one of the examples is:


        for @list -> $next {    # iterate @list, aliasing each element to 
                                # $next (and to $_)
                print if length > 10;
                                # same as: print $next if length $next > 10
                %count{$next}++;
        }

but what if there are multiple bound variables like this example:


        for %phonebook.kv -> $name, $number {
                print "$name: $number\n"
        }

is $_ aliased to either/both/neither of the two topics? are those now
not topics but just aliased variables?

i must know the answer so i don't get drawn to the dark side of the source

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to