#!/usr/bin/perl

use Term::ANSIColor;

sub multiply{
  my $a=shift;
  my $b=shift;
  my $c=($a*$b);
  return ($c);
}

sub valid_number {
       my $input="@_";
       print "You input $input\n";
       unless ( $input =~ /^\+?\d\.?\d*$/ ){
                die "Error: $input_number is not a positive number.\n";
        }
        return ($input);

}

print color("green"), "Please enter a number:\t",color("reset");
chomp(my $input=<STDIN>);
my $valid= &valid_number($input);
print "your number is vaild:\t $valid\n";

