Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Creating an Intermediate Perl Programming Curriculum

by Steve_p (Priest)
on May 04, 2004 at 14:03 UTC ( [id://350339]=note: print w/replies, xml ) Need Help??


in reply to Re: Creating an Intermediate Perl Programming Curriculum
in thread Creating an Intermediate Perl Programming Curriculum

Yes, that, and the ability to use for in a single statement like if and unless. For example:

s/foo/nofoo for @array;

Replies are listed 'Best First'.
Re: Re: Re: Creating an Intermediate Perl Programming Curriculum
by revdiablo (Prior) on May 04, 2004 at 16:31 UTC

    You can use foreach in the exact same manner. They are synonyms. One can always be used in place of the other:

    $ perl -le 'print foreach 1, 2, 3' 1 2 3

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found