hi ive got this assignment to do, ive got to write a perl program that analyses a text file to obtain statistics. Need some help with this particular section

when run the program should check if an argument has been provided if not the program should prompt for and accept input of a file name from the keyboard

i assume this has something to do with command line arguments however im finding it hard to find any sort of reference, the materials i have arent all that brilliant on how to properly code this for starters not even sure im looking in the right place

Recommended Answers

All 2 Replies

Personally if these arguments are operators or switches I like to use Get::Opts which converts the operators to $opt_[letter] and can get switches as well as values.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.