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, 2259👍, 0💬
Popular Posts:
In below sample code if we create a object of class2 which constructor will fire first? Public Class...
What Are the Parameter Modes Supported by PL/SQL? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
How To Create an Add-to-Google-Reader Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS ...
.NET INTERVIEW QUESTIONS - What is Multi-tasking ? It’s a feature of modern operating systems with w...
How can I enable session tracking for JSP pages if the browser has disabled cookies? We know that se...