Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Guess what it does ... and a challenge

by blokhead (Monsignor)
on May 24, 2008 at 19:36 UTC ( [id://688319]=note: print w/replies, xml ) Need Help??


in reply to Guess what it does ... and a challenge

I parsed that code correctly in my head, but didn't realize what the result would be.

Here is a program of the same length (as your second snippet) that does the same thing slowly:

1while$/x=8
Changing "8" to "2" will presumably make it take a longer time, but I didn't have the patience. Also, presumably this guy will take exponentially longer to get there:
1while$/.=1

blokhead

Replies are listed 'Best First'.
Re^2: Guess what it does ... and a challenge
by mtve (Deacon) on May 31, 2008 at 19:35 UTC

      No, it won't. Now, if you do $_='a' first, then it will, and extremely slowly too.

      - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found