Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by blakem (Monsignor)
on Jan 11, 2002 at 01:49 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-28 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found