programming-examples/perl/Datatype/Chop a number.pl

10 lines
215 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!C:/perl/bin
$number = 105;
print "\n\nBefore chop = $number \n";
$number2 = chop($number);
print "Result after chop function = $number2 \n\n";
print "Original string \$number after chop = $number \n";