my $x = 0; serialize($x); # outputs an integer say "x=$x"; # $x now has both valid int and string representations serialize($x); # outputs a string