$ perl -le 'local $foo = "whatever"; print $main::foo;' whatever