in reply to Re: use: command not found error
in thread use: command not found error

I got the same problem. Later I found that the #!/usr/bin/env perl -w was not in the first line. It was like this
# comments # comments # comments #!/usr/bin/env perl -w
Then I changed the above to
#!/usr/bin/env perl -w # comments # comments # comments
It worked.