#!/usr/bin/perl use strict; use warnings; while (1) { print "1) See the time.\n"; print "2) See who is online.\n"; print "Enter choice: "; my $choice = ; if ( $choice == 1 ) { print scalar(localtime()) . "\n"; exit 0; } elsif ( $choice == 2 ) { system("w"); exit 0; } else { print "Not a choice. Please try again.\n\n"; } }