Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Running Perl scripts written on Windows on FreeBSD

by Anonymous Monk
on Sep 20, 2004 at 11:06 UTC ( #392324=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Greetings wise monks, I hope you can help with a small problem. I write many of my Perl scripts on Windows and store them on CVSNT, but occasionally the CVS server ignores how I initially checked in my file with just LF characters and insists placing a CRLF character at the end of each line. This breaks my scripts when executed on the FreeBSD server with errors like : -
: bad interpreter: No such file or directory
I know how to strip out these characters using various command line scripts etc but I was hoping for a more permanent solution.
  • Comment on Running Perl scripts written on Windows on FreeBSD

Replies are listed 'Best First'.
Re: Running Perl scripts written on Windows on FreeBSD
by bsdz (Friar) on Sep 20, 2004 at 11:08 UTC
    Try something like this on the command line: -
    perl -e'symlink("/usr/bin/perl","/usr/bin/perl\r")'
    you can always remove the symlink by using: -
    perl -e'unlink("/usr/bin/perl\r")'
    Good luck!
      Absolutely brilliant, you're a genius bsdz!! I’ve even tested this with Linux and other interpreters like Bash and it works like a treat :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://392324]
Approved by pikus
[SwaJime]: Ran into an interesting piece of code today ...
[SwaJime]: select name,status, status2 from __ where status & status < 13 and status2 & 16 <> 16
[SwaJime]: I'm thinking that looks messed up. Sorry for OT ... but I know y'all are smart :-)
[SwaJime]: I expected items to not be selected if status was 0 ... but they were selected
[SwaJime]: any thoughts?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-08-22 17:59 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (338 votes). Check out past polls.