Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Perl oddities

by merlyn (Sage)
on Mar 01, 2005 at 19:41 UTC ( [id://435589]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl oddities
in thread Perl oddities

Perl doesn't DWIM in:
sleep 2.5;
But see:
use Time::HiRes qw(sleep); ... sleep 2.5;
You can't make core Perl do this, because the number of systems on which this worked was once miniscule compared to the number of systems on which it could never work.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^3: Perl oddities
by Limbic~Region (Chancellor) on Mar 01, 2005 at 19:46 UTC
    merlyn,
    You can't make core Perl do this

    To the letter of the law, that's true. In spirit though, select(undef, undef, undef, 2.5); is usually close enough. It would be nice if you didn't have to use something so ugly with core Perl though.

    Cheers - L~R

Re^3: Perl oddities
by Anonymous Monk on Mar 02, 2005 at 13:25 UTC
    You can't make core Perl do this

    Did I say we should change Perl to allow this? No. Do you understand the premises of this thread? brian was asking for what people consider oddities of Perl thinking. Now I'm sure any oddity has its reason for being odd (after all, it's there the way it is because someone put it there, and not because Larry has a piece of radioactive material next to his computer and he's just watching how the rays mutate Perl) - but that's not the point.

    I expect Perl to DWIM (just like it does in many other things), and if on my system select undef, undef, undef, 2.5 waits for about 2500 milliseconds, then there's no reason to assume sleep 2.5 can't.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435589]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-03-28 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found