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

Re: Searching input file

by tfrayner (Curate)
on Feb 28, 2002 at 00:43 UTC ( #148103=note: print w/replies, xml ) Need Help??


in reply to Searching input file

Hi,

Without actually running your script I would suggest that it will only return the last item found, and the total number and price of all items found. This is because each iteration of your while loop wipes out the previous entry. The simplest way to get around this would be to print out your info on each iteration rather than at the very end. Alternatively, you might want to use a hash (or array) of arrays (see perlman:perlref for a discussion of references, should you need it).

Other than that, I second the suggestion to use strict and warnings :-)

HTH, Tim

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://148103]
help
Chatterbox?
[ambrus]: Corion: which coordinate system is the upside down one?
[Corion]: ambrus: "the other" ;) To me, "normal" for GUIs means (0,0) is left-upper corner of the monitor/window. But for Prima, the lower-left corner it is ;)
[Corion]: Which would be OK for mathematics and paper, for me ;)
[ambrus]: Ok, so Prima has a postscript-like coordinate system

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2016-12-09 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.