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, 1876👍, 0💬
Popular Posts:
.NET INTERVIEW QUESTIONS - How to prevent my .NET DLL to be decompiled? By design .NET embeds rich M...
How To Create an Add-to-My-Yahoo Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
How To Compile a JUnit Test Class? Compiling a JUnit test class is like compiling any other Java cla...
How To Increment Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a...
Write out a function that prints out all the permutations of a string. For example, abc would give y...