Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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

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 scrutinizing the Monastery: (11)
As of 2016-06-29 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (379 votes). Check out past polls.