in reply to using -w breaks simple script

hm, something strange is going on there, i would agree whith the gremlins. open the case and look if they have bitten some cables through (gremlines do that sometimes).

ok, seriously now! if you are admin of the mashine, i would recomend to install a newer version of perl. look at Sunfreeware. they have prebuild packages which worked fine for me.
oh, and /opt/bin/perl isnīt the standard path for perl on solaris, try /usr/bin/perl and look whatīs there. This all semes to me like the perl you are using is some messed up self compiled version.
as last advise: try use warnings; instead the -w. Maybe that helps, dunno.

hope this helps you.