in reply to The first two number

A selection of more or less useful ways of doing it.

$newno = substr($no,0,2); $no =~ /^(\d\d)/ && $newno = $1; $newno = join '', unpack("AA", $no); $newno = join '', (split //, $no)[0,1]; $newno = int($no / (10 ** (length($no) -2))); etc ...

/J\