Swamped with your writing assignments? Take the weight off your shoulder!
Please see attached File
As you know, every device uses the IP address 127.0.0.1 to refer to itself. So, visitors arriving from that IP address are coming from the same machine. Your task is to write a scriipt that will count how many requests came from 127.0.0.1 and how many from elsewhere. For your submission, please provide your code for review.
1. Open the file for reading or die
2. Chomp remove trailing newlines
3. Use index function
4. Use substr function
Note: You may also use a regular expression (regex) if you want.