Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What does `$result = f() .. g()' really return?
What does `$result = f() .. g()' really return?
✍: Guest
False so long as f() returns false, after
which it returns true until g() returns true,
and then starts the cycle again.
This is scalar not list context, so we have the bistable
flip-flop range operator famous in parsing of mail messages,
as in `$in_body = /^$/ .. eof()'. Except for the first
time f() returns true, g() is entirely ignored, and f()
will be ignored while g() later when g() is evaluated.
Double dot is the inclusive range operator, f() and
g() will both be evaluated on the same record. If you
don't want that to happen, the exclusive range operator,
triple dots, can be used instead. For extra credit,
describe this:
$bingo = ( a() .. b() ) ... ( c() .. d() );
2013-09-06, 1954👍, 0💬
Popular Posts:
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]? a[i] == *...
How to set a HTML document's background color? document.bgcolor property can be set to any appropria...
What is the FP per day in your current company?
What is Native Image Generator (Ngen.exe)? The Native Image Generator utility (Ngen.exe) allows you ...
.NET INTERVIEW QUESTIONS - How to prevent my .NET DLL to be decompiled? By design .NET embeds rich M...