sub function($_) #arbitary function...will be given in the partually written program { return ( $_[0] - 50.02 )**2 + 2; } #### use Carp qw/croak/; # put near the top of your program sub function { if ( @_ != 2) { croak("function() requires two arguments"); } my ( $x, $y ) = @_; # ... body of function } #### sub fp_equal { my ($X, $Y, $POINTS) = @_; my ($tX, $tY); $tX = sprintf("%.${POINTS}g", $X); $tY = sprintf("%.${POINTS}g", $Y); return $tX eq $tY; }