|more useful options|
help manipulating data in an array.by nightfreightpilot (Initiate)
|on Nov 12, 2004 at 03:58 UTC||Need Help??|
nightfreightpilot has asked for the
wisdom of the Perl Monks concerning the following question:
1st..excellent site. I have only tonight stumbled upon what appears to be the plethora of perl information I have been searching for. I am late in life starting my programming journey, however there is no time like the present to start. Perl is my first language and the learning curve seems steep indeed. I am self-teaching using both the Sam's 24 book and the "Camel" book. I am in the first chapters.
With the assistance of Cingular, and cut/paste, I have created a file of all the phone numbers I've called. With my first real code, I would like to open that file and simply identify how many times I've called a particular number. Adding the minutes and such will come at a later time I suppose. I printed the file and manually determined the number of times I have called a number ending with 9432 to be 84 out of nearly 300 entries (for error checking purposes). The code I have written thus far follows:
Upon running, I receive the following errors:
Obviously my code isn't running, but I'm not sure as to why. I've bound using ~...am looking from beginning to end of line for 9432....each time I look through a line the count in incrementing. Any help would be most welcome.
Edited by davido: Rescued formatting, supplied code tags.