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

RE: for loops

by Falthor (Initiate)
on Jun 02, 2000 at 02:47 UTC ( #15918=note: print w/replies, xml ) Need Help??


in reply to for loops

just wondering here... if a value is not assigned to a variable at the startup does that mean that the value is automatically assigned to 0 ? Jason Temple AKA Falthor Assistant Operartions Manager Neurogames

Replies are listed 'Best First'.
RE: RE: for loops
by davorg (Chancellor) on Jun 29, 2000 at 16:51 UTC

    No. An unassigned variable contains the special value undef. This will evaluate as false under some circumstances. 0 (and, indeed, '0') also evaluates as false, which is where the confusion arises.

    --
    <http://www.dave.org.uk>

    European Perl Conference - Sept 22/24 2000
    <http://www.yapc.org/Europe/>
RE: RE: for loops
by Anonymous Monk on Jun 28, 2000 at 05:20 UTC
    Now how does it know to print on the next line ? do we specify anything or it just does it ?
      Suggest you re-visit the String scalars section. The \n is a newline character to be printed. Thus after each value, a newline is printed (CR/LF) so the next print will start on a new line

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-05-30 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (172 votes). Check out past polls.

    Notices?