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

Reply via email to