Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Difference between 'print while' and 'while print'

by edan (Curate)
on Feb 02, 2005 at 10:17 UTC ( #427197=note: print w/replies, xml ) Need Help??


in reply to Difference between 'print while' and 'while print'

You should probably read perldoc perlsyn, looking at the sections entitled "Simple Statements" and "Compound Statements". This will explain the difference in syntax. The short of it is that "print while (CONDITION);" is a simple statement (print) with a "modifier" (while), whereas "while(CONDITION){print}" is a compound statement, consisting of the while (and its associated CONDITION) followed by the BLOCK of code to be executed. It's a purely syntactic difference.

--
edan

  • Comment on Re: Difference between 'print while' and 'while print'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://427197]
help
Chatterbox?
[stevieb]: Corion: the problem with that is the 2.36 represents the underlying C library I've wrapped, which is why I want to use incrementals after the real version number. I've emailed modules@ to see if they can expedite the process for me...
[stevieb]: ...as normally, it takes three days to delete, in case you want to change your mind

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-01-19 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.