evereno has asked for the
wisdom of the Perl Monks concerning the following question:

I have been asked to input a text file ,, I have to display a number of lines and a number of words, display the longest and shortest word in each line , occurrencess of words in each document how do I do this please

Post code that you've written, and we'll be happy to give both syntactic and stylistic feedback. However, we're here to help you learn, and learning generally takes a lot of work on your part. See How do I post a question effectively?.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Start by surfing for examples. Start with the very simplest one: a loop that reads a file and prints each line. From there, you can see your way to how to count the lines. Next, look at split, and write a separate experimental script that takes some string and splits it. Figure out how to count the number of elements in that string, and how to write a loop to iterate through the list. You can find examples of all of these things ... and this is the only way to learn how to do this stuff. You’re going to stumble, you’re going to make mistakes, and you’re going to learn the craft from that.