Sunday, January 2, 2011

Perl: Strings and Increments

$string="perl";
$num=20;
$mx=3;

print "The string is $string and the number is $num\n";

$num*=$mx;
$string++;
print "The string is $string and the number is $num\n";


OUTPUT:
The string is perl and the number is 20
The string is perm and the number is 60     #last character only change

No comments: