in reply to A TRUE-once variable
Well, *I* never use it, because I have to run man perlop every time I see one, but...
In scalar context, ``..'' returns a boolean value. The operator is bistable, like a flip-flop ... It can test the right operand and become false on the same evaluation it became true (as in awk), but it still returns true once.
Anybody who can get it to work, though? I can't get what I expect from, e.g.
$\ = ', '; for (1..10) { print if (1..0) }Rhandom is right, revising the algorithm is likely the way to go, but I'd like to learn how to use this as a cool way to write "the first time..."
In Section
Seekers of Perl Wisdom