flip-the-switch

To run the file go to CLI and use "perl Assignment.pl"

It will wait for input. Put the input as shown in the question and hit enter.