Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

RE: (3) shortest

by Adam (Vicar)
on Sep 18, 2000 at 19:36 UTC ( #32966=note: print w/ replies, xml ) Need Help??

in reply to RE: RE: shortest
in thread shortest

Yup. Actually Its worse then that. Try using a number with a zero in it. It stops at the zero. I guess I should have run it instead of just trusting that it would work. (I'll try to re-write it to make it work, and I'll post the current, bad, version here so that other's will understand the mistake.)

chop($_=<>);print "\n$a: ",$a>>1?'odd':'even' while $a=chop; # The above snipit does not work. # When I posted it, I was thinking that the bit shift >> # would return the bit shifted off the end, but of course, # sanity eventualy prevailed and I realized that it does # not do that. (duh!) # Additionally, it has a bug in that it stops on the first # zero in the number. # # TEST TEST TEST!!!

Comment on RE: (3) shortest
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-09-17 19:18 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (96 votes), past polls