The scanner gives me the original scanned barcode without changing anything. But no errors at all.
Is your solution
s/\b(\d+)\b/reverse sprintf "%013d", scalar reverse $1/eg;
a real regex? or has it already some extra program-lines? (like sprintf...)