I have edited the message, improved readability, and corrected the negative value flaw; the only trouble is that it warns if there's a non-integer argument :(. I don't know how to correct this.
#!/usr/bin/perl
use warnings;
use strict;
print "Welcome to blob maker V1.2\n";
print("Input your blob's height: ");
chomp(my $height=<STDIN>);
$height=int($height);
die("Invalid argument.\n") if ($height < 1);
print("Input your blob's width: ");
chomp(my $width=<STDIN>);
$width=int($width);
die("Invalid argument.\n") if($width < 1);
print("Input blob message: ");
chomp(my $msg=<STDIN>);
print("\n");
while ($height > 0 ){
print("$msg" x $width . "\n");
--$height;
}
|