first.pl : Command not found

Hi,

When I try to run a Perl script first.pl by typing at the prompt :
first.pl

I have the following issue :

first.pl : Command not found

Thanks the which command I determined the location of Perl so my script is as below :

#!/usr/local/bin/perl -w

($user) = @ARGV;

print "Hello $user\n";

If I write at the prompt :
perl first.pl

I don't have the issue.

Any ideas,
Thanks in advance
LVL 1
Richard Coffree-commerce Product ManagerAsked:
Who is Participating?
 
marecsCommented:
chmod +x first.pl
./first.pl
0
 
Richard Coffree-commerce Product ManagerAuthor Commented:
OK,

It wasn't a right issue because I previously set the execution right, it was ./.

Can you explain me why I should put it ?

Thanks in advance
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.