Lunarpages Web Hosting Forum

Author Topic: Changing Perl Path When Uploading from Windows to lunarpages  (Read 922 times)

Offline noamro2

  • Newbie
  • *
  • Posts: 1
    • http://nr.lunarpages.com
I'm running an Apache Server with Action Perl on my XP where I do my development before I upload tested programs to my lunarpages account. My perl scripts on my local machine need to have:
 "#!D:/Perl/bin/perl.exe"
but when I upload these scripts they'll need to change to: "#!/usr/bin/perl" .
1) How can avoid keeping 2 copies of these scripts?
2) Is there any tool on lunarpages that I can run to automatically change this path?
Thanks,
Noam

Offline Ed

  • Berserker Poster
  • *****
  • Posts: 5156
    • Joke A Whenever
Changing Perl Path When Uploading from Windows to lunarpages
« Reply #1 on: May 31, 2004, 05:37:54 PM »
One easy option would be to use a tool like textpad.com 's text editor and just open all your files at once and do a mass find and replace before uploading.

Find: #!D:/Perl/bin/perl.exe
Replace with: #!/usr/bin/perl

Visaversa if you want to take a program from the server and run it locally.

This is probably the least amount of work :)

Offline Ripta

  • Master Jedi
  • *****
  • Posts: 1271
Changing Perl Path When Uploading from Windows to lunarpages
« Reply #2 on: June 01, 2004, 01:06:47 AM »
Quote from: Ed
One easy option would be to use a tool like textpad.com 's text editor and just open all your files at once and do a mass find and replace before uploading.

Find: #!D:/Perl/bin/perl.exe
Replace with: #!/usr/bin/perl

Visaversa if you want to take a program from the server and run it locally.

This is probably the least amount of work :)


If you're on Win2K (at least Professional), WinXP (Pro edition), or Win2K3 (any edition), you can usually leave it as #!/usr/bin/perl, and simply make all .pl (or .cgi) scripts to be opened by perl.exe by default (i.e. "Open with..." and make it the default). This would:
  • Run the script if you double-click it on Windows
  • Run the script without further adjustments if your test server is a WAMP (Windows Apache MySQL PHP)
  • Render it uploadable without any change needed
  • [/list:u]

    I know the above has worked when I've had to "live with" Windows as a development environment ;).
GetAFreelancer! (This service is not affiliated with Lunarpages)