Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Thoughts on Perl6 - Love it? Hate it?

by blakem (Monsignor)
on Jan 11, 2002 at 01:49 UTC ( #137843=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Thoughts on Perl6 - Love it? Hate it?
in thread Thoughts on Perl6 - Love it? Hate it?

$| is magic. It is always either 0 or 1. $|++ sets its value to 1 no matter what its original value was.

However, $|-- is a bit trickier. $|-- toggles the value of $|. So, its actually a lot like $| = !$_

% perl -le 'print $| and $|++ for 1..5;' 0 1 1 1 1 % perl -le 'print $| and $|-- for 1..5;' 0 1 0 1 0

-Blake


Comment on Re: Re: Re: Thoughts on Perl6 - Love it? Hate it?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (18)
As of 2015-07-30 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls