[sf-perl] perl on a mac

Kevin Frost biztos at mac.com
Sat Nov 22 18:52:24 PST 2008


Why the semicolon?  You may have thrown an error.

I would do it like this, if for some reason I really didn't want my  
CGI programs executable:

phrun() {
     perl "$1" > "$1.$$.html" && open "$1.$$.html"
}

But that's still frighteningly unsafe for my taste.  Try "phrun -v"  
for instance. (It won't break anything; just use the Finder to look at  
the file.)

It's also worth noting that a lot of "standard" CGI programs will  
output an HTTP header, which may not look so good in your browser.   
Getting around that is probably just as much work as setting up a  
local web server.

-- f.

On Nov 22, 2008, at 6:04 PM, Randal L. Schwartz wrote:

>>>>>> "yary" == yary  <not.com at gmail.com> writes:
>
> yary> Try this, to save yourself some typing
> yary> $ phrun() {
> yary>   perl $1 > temporary.html | open temporary.html
> yary>  }
> yary> $ phrun idpass.cgi
>
> Why the pipe?  You're not piping anything.  A semicolon would be more
> appropriate.
>
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503  
> 777 0095
> <merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> See http://methodsandmessages.vox.com/ for Smalltalk and Seaside  
> discussion
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm



More information about the SanFrancisco-pm mailing list