Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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


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

Comment on Re: Searching input file

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2015-11-28 22:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls