Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: SImulation of an Inventory.

by 2teez (Vicar)
on Jun 23, 2012 at 01:41 UTC ( #977920=note: print w/replies, xml ) Need Help??


in reply to SImulation of an Inventory.

"..What am I doing wrong?"
Several! Please, use use strict; you will catch some.

In your if statements you assign. I think what you intended was

if($diff == 'hard'){...}

You also have several barewords in your code..

Replies are listed 'Best First'.
Re^2: SImulation of an Inventory.
by Eliya (Vicar) on Jun 23, 2012 at 08:06 UTC
    if($diff == 'hard'){...}

    That isn't right either, because it does a numeric comparison.

    It should be

    if($diff eq 'hard'){...}

      Oops! Thanks Eliya for catching that, you are right !

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2021-02-26 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?