Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Hashes and Associative Arrays

by GrandFather (Saint)
on Jan 27, 2016 at 03:33 UTC ( [id://1153724]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Hashes and Associative Arrays
in thread Hashes and Associative Arrays

You haven't yet taken your programmer hat off and put a user hat on. Until you do that and specify how the user will interact with your script, you can't write the script!

Is your input really all on one line? Maybe you need to put your sample data in code tags (you can edit your node to do that).

Premature optimization is the root of all job security

Replies are listed 'Best First'.
Re^4: Hashes and Associative Arrays
by phizymonk (Novice) on Jan 27, 2016 at 03:38 UTC

    I am sort of confused, the user will open the program and items and their prices will be printed then the user will be asked to change the prices of the items that were printed. These items should come from a text file.

      OK, there's the specification. Now all you need to do is write the code to do that. One way to work through it is write three different tiny scripts that each does one of the tasks. Mock up the data that may have been created by a previous step so you can focus on how to manage the current step.

      Mocking up the data may be just hard wiring data into a hash or array depending on what you think may be the best way to work with the data. The important thing is to focus on just the current part of the overall job. Often you will find that one part of the task needs the data to be a certain way and you need to go back and modify a previous step, but that's OK because you are still focusing on whatever the current step is.

      Premature optimization is the root of all job security

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found