Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
[Corion]: On the other hand, the Radeon 580 RX would cost 380 instead of 430 ... But still, that's ATi and I've been unhappy with ATi drivers the two times I had one in my desktops

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-08-21 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (319 votes). Check out past polls.

    Notices?