ruzam++ has given you some very good advice about how to organize your algorithm.
You don't say how much of perl you are expected to know or use. CPAN has lots of modules which would help, up to nearly solving the whole thing. I'll mention a couple which would help with discrete pieces of the problem.
You start by parsing an option from the command line. The Getopt::Long module provides the standard way of doing that. It works for multiple options and preserves input filenames listed on the command line. That is probably where you should get the name of the file to crunch. Getopt::Long is a base module distributed with perl, so if you are allowed any modules at all, it should be acceptable.
The roman numeral requirement for paging is an entertaining subproblem which your instructor may wish you to solve for yourself. There is the Math::Roman module to do it for you, however. You can increment a Math::Roman numeric variable and stringification will produce the roman representation. Math::Roman is not a base module, but is available from CPAN.
Good luck, and have fun. This seems like an enjoyable exercise to learn with.
After Compline,
Zaxo
In reply to Re: Formatting Text
by Zaxo
in thread Formatting Text
by lollipop7081
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |