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

[perl #33764] perldoc -f my: add example of how to initialize more than one

From:
Dan Jacobson
Date:
January 11, 2005 14:22
Subject:
[perl #33764] perldoc -f my: add example of how to initialize more than one
Message ID:
rt-3.0.11-33764-105523.2.39329660548925@perl.org
# New Ticket Created by  Dan Jacobson 
# Please include the string:  [perl #33764]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=33764 >


$ perldoc -f my
   ...If more than one value is listed, the list must be placed in parentheses.
OK, but add an example of how to also initialize them at the same time.
The user guesses
    my ($c,$f)=0;
But if must still do
    $c=$f=0;
unless he wants to get yelled at at
    print $c, $f;
Which by the way means maybe we should get a warning at
    my ($c,$f)=0;
because it doesn't do what we thought.




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