# File: conversions.pl # Author: Mihaela Malita # int - get the integer portion of a number # ord - find a character's numeric representation # chr - get character this number represents # scalar - force a scalar context # join - join a list into a string using a separator my $n = 3.14; print "\n$n, integer is ", int($n); # ord - find a character's numeric representation my $ch = 'a'; print "\n $ch, ASCII is:", ord('a'); # chr - get character this number represents print "\n 98 ASCII is:", chr(98); @ mm = ( 'ann','dan', 'cara' ); $mys = join(" ",@mm); # from array to string with separator blank print "\n $mys"; # string is= "ann dan cara" print scalar(@mm); # prints length of array exit;