use strict; use warnings; use feature 'say'; print 'Enter a string: '; chomp( my $string = ); print 'Enter a number: '; chomp( my $num = ); my $result = $string x $num; say "The result is :\n $result"; my $length = length $result; if ( $length >= 100 ){ say "Length $length is too big, bye"; } else { say "Length $length OK"; }