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

Re: Sutra of Optimism

by BUU (Prior)
on Nov 27, 2002 at 06:52 UTC ( [id://216019]=note: print w/replies, xml ) Need Help??


in reply to Sutra of Optimism

Wouldn't it make more sense to have an optimist be  /\d+/; and a pessimest /\d*/;?

Replies are listed 'Best First'.
Re^2: Sutra of Optimism
by diotalevi (Canon) on Nov 27, 2002 at 07:54 UTC

    No because /\d*/ will always match so you must be significantly more optimistic about the state of your data than a more restrictive /\d+/. requiring at least /something/ is still pretty optimistic...

    __SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;
Re: Re: Sutra of Optimism
by submersible_toaster (Chaplain) on Nov 28, 2002 at 06:44 UTC
    /\d*/ would be the apathist , I'll take digits if they're there, but whatever is fine by me..

    the optimist perhaps would not even consider using a regex, this scalar will always be a number.

    the pessimist ?

      the pessimist ?
      die "Pessimist";
      A true pessimist would not even bother to test for the numbers, because he *knows* in his heart that there will be none. ;-)
      You have moved into a dark place.
      It is pitch black. You are likely to be eaten by a grue.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-03-29 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found