in reply to 4 arg select as an alternative to Time::HiRes ?

You could also try this for size:
BEGIN { *CORE::sleep = sub(;$) { select((undef)x3, shift) } } sleep 0.75;

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: 4 arg select as an alternative to Time::HiRes ?
by BrowserUk (Patriarch) on Mar 02, 2003 at 01:57 UTC

    I can never get select to accept (undef)x3,$time?

    I also found that substr won't accept an array for its argument list either?


    Examine what is said, not who speaks.
    1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
    2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
    3) Any sufficiently advanced technology is indistinguishable from magic.
    Arthur C. Clarke.
      $ perl -le'print for prototype("CORE::substr"), prototype("CORE::selec +t")' $$;$;$ ;*

      You are right about substr. Unfortunately, select seems to have some special magic; even the error message you get is unique to it.

      One more thing to remember..

      Makeshifts last the longest.

        It's probably too obscure for general use, but I did just 'discover' that you can do

        select((),(),(),.125);

        Examine what is said, not who speaks.
        1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
        2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
        3) Any sufficiently advanced technology is indistinguishable from magic.
        Arthur C. Clarke.