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, 1779👍, 0💬
Popular Posts:
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
In below sample code if we create a object of class2 which constructor will fire first? Public Class...
What is the quickest sorting method to use? The answer depends on what you mean by quickest. For mos...
Can each Java object keep track of all the threads that want to exclusively access to it?
What is the difference between mysql_fetch_object() and mysql_fetch_array() functions in PHP? mysql_...