Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 20th, 2007, 1:44 PM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Running a Mac-Written Script on a Linux Machine

Hey guys, it's been a while. I'm only here for a quick question, because I need this answered asap for the work I'm doing (at Nortel btw).

I've written the simplest piece of code ever, on a Mac in MacPerl.

#!/usr/bin/perl
print "Hello World!";

I can run this fine on the Mac's test console, receiving the appropriate output.

However, when I upload it to the Linux server via Fetch, I get a 500 Internal Server Error. Despite the fact that there are hundreds of other working Perl scripts in that exact same directory (with the same file permissions).

My first thought is that the ASCII is being encoded differently, such as with newlines and quotations. Can anyone confirm this, and suggest a fix?

P.S. Congrats PFO. You are the first website (besides Google) that displays correctly on the old Internet Explorer so far! You're a life saver!
Sane is offline   Reply With Quote
Old Nov 1st, 2007, 8:30 PM   #2
fahlyn
Newbie
 
Join Date: Nov 2007
Posts: 15
Rep Power: 0 fahlyn is on a distinguished road
Re: Running a Mac-Written Script on a Linux Machine

The problem is that you're not printing a header....try adding this

print "Content-type:text/html\n\n";
fahlyn is offline   Reply With Quote
Old Nov 1st, 2007, 8:46 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Re: Running a Mac-Written Script on a Linux Machine

I figured out it wasn't transferring the newlines properly. Thanks for the help anyways.
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a script to add in IP's for Red Hat Linux Thaidog Bash / Shell Scripting 2 Aug 24th, 2007 11:05 PM
Slackware installation guide for Linux beginners coldDeath Coder's Corner Lounge 104 Jul 29th, 2007 4:40 AM
My views on Linux Marvin Coder's Corner Lounge 70 Dec 19th, 2006 11:13 AM
AutoIt, Apple Script, what about Linux? Nebula Coder's Corner Lounge 5 Mar 20th, 2006 7:07 PM
running linux arod199113 Coder's Corner Lounge 5 Feb 12th, 2005 5:28 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:34 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC