Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Head to numb to see it.....

by mkmcconn (Chaplain)
on Mar 08, 2001 at 22:42 UTC ( #63055=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Head to numb to see it.....
in thread Head to numb to see it.....

$s = 0; print $s ++ for 1..9;
Will not increment. Apparently, it depends on the context, whether the whitespace matters.

mkmcconn

update: danger, I'm sure you must be right about the prototyping of print().

Replies are listed 'Best First'.
Re: Re: Re: Re: Head to numb to see it.....
by danger (Priest) on Mar 08, 2001 at 23:02 UTC

    There have to be exceptions to every rule :-). This was obviously not the problem with the present question though. And, I am inclined think this is perhaps a little bug:

    sub blah { print shift; } blah($s ++) for 1 .. 9; # works fine blah $s ++ for 1 .. 9; # syntax error print $s ++ for 1 .. 9; # syntax error print($s ++) for 1 .. 9; # syntax error

    The latter print() case is probably related to print()'s prototype for optionally accepting a filehandle).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2023-03-24 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?