That was not the problem. The problem was the ^M at the end of each line
walter valenti <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
10/24/2001 09:11 AM
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: No such file or directory exists
Hi,
look the first line of the script: contains the location of perl's
interpreter
Most common are:
#!/usr/bin/perl
#!/usr/local/bin/perl
Walter
> I'm working with my perl scripts in Linux and Windows. my scripts were
> running fine when I ran them as "perl myscript.pl"
>
> but when I tried to execute the perl script using only its name
> (./myscript.pl) then I would get the message "No such file exists"
> I searched and searched until I found that there were ^M chars at the
end
> of each line of my source. These could not be seen with the text editor
I
> was using, but could be seen using "cat -v myscript.pl"
>
> I also found a one line perl command that removes all of these
characters,
> and then my script worked fine to run as "./myscript.pl".
> I don't have that command on this machine, but if anybody is having the
> same trouble, I could email them later with the command.
>
> What is the cause of these chars? Is it using a Windows editor to code
> these scripts, and then running them in Linux?
> I'm curious to know the cause of this because I spent a good part of 2
> hours getting that problem sorted out.
>
> Thanks,
> Greg
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com