#!PERL.EXE -w use strict; print "Enter a number: "; my $a=<STDIN>; chomp($a); print "Enter another number: "; my $b=<STDIN>; chomp($b); print "$a^2-$b^2=".R($a,$b)."\n"; print "\nPress ENTER"; <STDIN>; # press ENTER to contiune ##### sub R { my ($p, $q)=@_; # no strict number of parameters can be enforced # we simpli pick up the first parameter and ignore possible more # if there is not enough parameters, remaining receive UNDEF value my $result= $p*$p-$q*$q; return ($result); # there is no explicit definition of the number of parameters # that are returned, or even if anything should be returned }