#!/bin/perl use Carp qw(cluck); print "Number: "; $grade = <STDIN>; try($grade); # Call subroutine sub try{ my($number)=@_; cluck "Illegal value: " if $number < 0 || $number > 100; } print "That was just a warning. Program continues here.\n";