in reply to Detecting if a scalar has a number or string

I run this and get the following error: "Operation `+': no method found, left argument has no overloaded magic, right argument in overloaded package Foo at line 22."

From memory, if that is a warning you can solve it by putting in the pragma no warnings 'void'; (or somethin like that). That will get rid of those pesky warnings. These pragmas should help you diagnose the problem:

use strict; use warnings;