#!/usr/bin/perl use strict; no warnings 'numeric'; my $this = sprintf("0x%x", 40); my $that = sprintf("0x%x", 2); my $other = $this + $that; printf "$other %x\n", $other; __END__ 42 2a