Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Happy 2006

by QM (Parson)
on Jan 17, 2006 at 00:35 UTC ( [id://523674]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Happy 2006
in thread Happy 2006

The running time is about the same, but your solution uses a lot more memory, as it makes a list of all possible expressions to test before making the first test, while my solution tests each expressions right after it is constructed. My solution has a lot less pagefaults.
Ah, someday soon, glob will be an iterator in scalar context.

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^4: Happy 2006
by ysth (Canon) on Jan 17, 2006 at 01:17 UTC
    It is, but that doesn't help here.
      s/iterator/lazy iterator/;

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of

Re^4: Happy 2006
by Perl Mouse (Chaplain) on Jan 18, 2006 at 05:05 UTC
    As pointed out, glob is an iterator in scalar context. However, for provides list context.
    Perl --((8:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://523674]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.