in reply to <STDIN> always in string mode?

Reads from a file handle using the diamond (<>) operator will always pass you a string - such is the nature of a read.

Treating 077 as octal is something perl's parsing does at compile time. If you want this at run time, you need to eval:

my $foo = "077"; print eval($foo), "\n"; # prints 63

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)