develooper Front page | perl.perl5.porters | Postings from January 2006

Fortunate syntactic oddity

From:
Mark Jason Dominus
Date:
January 28, 2006 11:47
Subject:
Fortunate syntactic oddity
Message ID:
20060128194633.6423.qmail@plover.com

As a side effect (unexpected?) of the way "qw(...)" is handled, this
syntax works, and has worked since 5.6.0:

        for my $i qw(don't put that in your nose) {
                print ">$i<\n";
        }

It seems to me that this might be worth documenting and supporting.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About