Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Perl script that accepts exactly 2 integer arguments where the first argument must be less than the second argument. The script will print

Write a Perl script that accepts exactly 2 integer arguments where the first argument must be less than the second argument. The script will print a comma separated list of integers starting with the first argument up through the second argument.

The last printed value should be the second command line argument not be followed by a comma.

The script should also be able to handle the following errorsituations:

o incorrect number of arguments

o the first argument is not less than the second argument (dont worry about trying to handle non-integer arguments)

The script file name must be: intlist.pl

The script must be located in $HOME/itec400/homework

Make sure the permissions on the your itec400 directory are 705

Make sure the permissions on your script are 705

image text in transcribed

***Please use the template below - replace X***

image text in transcribed

Sample Output Sunny Day Scenarios >intlist.pl 3 13 3,4,5,6,7,8,9,10,11,12,13 >intlist.pl -37 -3,-2,-1,0,1,2,3,4,5,6,7 Rainy Day Scenarios: >intlist.pl 4 error: incorrect number of arguments usage: intlist.pl a b (where aintlist.pl 13 3 The first argument must be less than the second argument usage: intlist.pl a b (where a value # Check for the correct number of arguments on the command line. unless (@SYNTAX==2) { print "error: incorrect number of arguments", " ", "usage: intlist.pl a b (where a

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

=+what information would you need about the compact disc industry?

Answered: 1 week ago