in reply to Re: <STDIN> always in string mode?
in thread <STDIN> always in string mode?

be aware that evaling something read from an external file or STDIN is highly insecure. In an untrusted environment, you should check the input (and use taint checking):
$foo = <STDIN>; if ($foo =~ /^(\d*)$/) { $foo = eval $1; print "foo: $foo\n" } else { die "bad input" }