Mannually change the $1 variable
$! = 1; print "$!\n"; print "Error number " , 0 + $! , " occurred.";