<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Sorry Mike but it's a lot more simple than that!<br><br>This is a very experienced list and most of us avoid getting into "religious" discussions.<br>But, since I stuck my neck out, I will stay in it...<br><br>
The original question is from an obvious "newbie" (and seemingly a pretty smart one from I can tell).<br>A lot of us on this specific list have multiple disciplines and the only reason I spoke when i did was when i couldn't stand it anymore.<br>But your argument is just too inviting to old-school smack.<br><br>And given that, try to remember when you were a newbie, we all were at one point!<br><br>(to everyone else, sorry for the soapbox!) <br><br>-Darin<br><br><div>&nbsp;</div>Not a shred of evidence exists in favor of the idea that life is serious.<br>- Brendan Gill<div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael Friedman &lt;friedman@highwire.stanford.edu&gt;<br><b><span style="font-weight: bold;">To:</span></b> Walt Sanders
 &lt;wsanders@cruzio.com&gt;; San Francisco Perl Mongers User Group &lt;sanfrancisco-pm@pm.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, November 17, 2008 10:08:09 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [sf-perl] perl on a mac<br></font><br>
Walt,<br><br>Maybe I'm just cranky today or maybe I'm too partisan, but I feel I have to reply to "what a mess to go through for a supposedly polished OS".<br><br>Mac OS X does exactly what every other OS does when given the input and output you've shown: if you run a perl script on the command-line, and it uses print statements, it prints the output in that same window. Whether the output happens to be text, HTML, or binary data doesn't matter at all. Print is print.<br><br>It sounds to me like on Windows you were running perl not from the command-line but from a fancy IDE which would recognize that the output was HTML and read it for you, copy it to a temporary file, and open that file in your browser. This behavior sounds great, but it's unrelated to the operating system (and perl itself, for that matter). It's entirely a function of whatever IDE you were using that just happened to run on Windows.<br><br>To get the same behavior on OS X (or any other
 unix variant), you can do what Alex Feinberg suggested seven days ago:<br>&nbsp;&nbsp;&nbsp; perl <a target="_blank" href="http://myscript.pl">myscript.pl</a> &gt; /tmp/file.html &amp;&amp; open /tmp/file.html<br><br>which tells perl to run your script (so instead of "myscript.pl" you'd use the path to your CGI script), take the output and write it to a file instead of to the screen, and then open that file. (The open command sees the extension ".html" and knows to open the file in your default browser.) If this doesn't work, there are only a couple of reasons:<br><br>1. "perl" isn't in your path. Use wherever you installed perl instead. The built-in version is /usr/bin/perl.<br><br>2. Your script's output didn't properly parse as HTML. That can cause a blank page to appear in the browser. In this case, you can go read the temp file directly to see what happened or use "View Source" on the blank browser page.<br><br>If you are using BBEdit or TextMate
 or Eclipse or another heavy-duty OS X text editor it should be easy to set this up as a menu option within the editor.<br><br>Setting up apache to use something more than the default configuration is never an easy task, even on Windows. It's "messy" like tuning a race car is messy -- it's a really complicated engine because there's more power under the hood than you could possibly use on the streets. But again, that's a "feature" of apache, not of the OS.<br><br>So, it seems to me that what you are really looking for is an IDE that has support for debugging CGI scripts internally. One that just happens to run on Mac OS X.<br><br>I haven't used it personally, but I believe that this is available in ActiveState's Komodo IDE, which runs on Windows, Mac OS X, or Linux. You can find out more and download a demo from their website:<br>&nbsp;&nbsp;&nbsp; <a href="http://www.activestate.com/Products/komodo_ide/index.mhtml"
 target="_blank">http://www.activestate.com/Products/komodo_ide/index.mhtml</a><br><br>You should also check to see if the IDE you currently use on Windows offers a Mac version. Some do.<br><br><br>Anyway, I wish you the best of luck with your new Mac! I've been programming perl on OS X for years now and have found it to be a very good developer platform. The command-line shell takes some getting used to if you've only used Windows's limited command shell, but it's a great tool once you understand it.<br><br>-- Mike Friedman<br><br>PS - On a non-perl note, I highly recommend Take Control eBooks if you want to learn more about your Mac.<br>&nbsp;&nbsp;&nbsp; <a href="http://www.takecontrolbooks.com/catalog.html" target="_blank">http://www.takecontrolbooks.com/catalog.html</a><br><br>They don't have one about the unix underpinnings or using the command-line, so you may also want to check out one of the "Unix on Mac OS X" books such as O'Reilly's _Learning
 Unix for Mac OS X Tiger_. There are others, and that one's a little outdated, but it's still almost entirely relevant for Leopard.<br><br><br>On Nov 17, 2008, at 6:30 PM, Walt Sanders wrote:<br><br>&gt; Lara, I surely hope you had all this in a file to grab and send?!&nbsp; My god what a mess to go through for a supposedly polished OS.&nbsp; And why doesn't Apple have this already configured, I'm wondering.<br>&gt; <br>&gt; Gotta go now and I'm away tomorrow, but will then try to digest your instructions and give it a try.&nbsp; I am at the point where I was about to start advertising for a fixer to take my machine and make it work.&nbsp; But, this is new hope.&nbsp; Many, many thanks and I'll report back.&nbsp; Walt.<br>&gt; <br>&gt; <br>&gt; <br>&gt; On Monday, at , Lara Ortiz de Montellano wrote:<br>&gt; <br>&gt;&gt; 1. Re: perl on a mac (Walt Sanders)<br>&gt; _______________________________________________<br>&gt; SanFrancisco-pm mailing
 list<br>&gt; <a ymailto="mailto:SanFrancisco-pm@pm.org" href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br>&gt; <a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br><br>---------------------------------------------------------------------<br>Michael Friedman&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  HighWire Press<br>Phone: 650-725-1974&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Stanford University<br>FAX:&nbsp;  270-721-8034&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;<a ymailto="mailto:friedman@highwire.stanford.edu" href="mailto:friedman@highwire.stanford.edu">friedman@highwire.stanford.edu</a>&gt;<br>---------------------------------------------------------------------<br><br><br>_______________________________________________<br>SanFrancisco-pm mailing list<br><a
 ymailto="mailto:SanFrancisco-pm@pm.org" href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br></div></div></div></body></html>