W
worlman385
for the code below i got error at line 14
if ( $string1 gt $string2 )
print "$string1 $string2";
what's the problem?
thanks
print "Enter the first string: ";
$string1 = <STDIN>;
print "Enter the second string: ";
$string2 = <STDIN>;
chomp $string1;
chomp $string2;
if ( $string1 gt $string2 )
print "$string1 $string2";
elsif ( $string1 lt $string2 )
print "$string2 $string1";
elsif ( $string1 eq $string2 )
print "$string1\n$string2";
exit;
if ( $string1 gt $string2 )
print "$string1 $string2";
what's the problem?
thanks
print "Enter the first string: ";
$string1 = <STDIN>;
print "Enter the second string: ";
$string2 = <STDIN>;
chomp $string1;
chomp $string2;
if ( $string1 gt $string2 )
print "$string1 $string2";
elsif ( $string1 lt $string2 )
print "$string2 $string1";
elsif ( $string1 eq $string2 )
print "$string1\n$string2";
exit;