You are invoking the script incorrectly: these errors are clearly from bash
, while perl
should be running the script instead.
I don't know how you're running it now, but (assuming its filename is mywhoami
) you can always invoke perl
explicitly:
perl mywhoami
It should also work to make it executable
chmod a+x mywhoami
and then execute it:
./mywhoami