Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Simple Perl print() output redirect to html/webpage.

by Anonymous Monk
on Sep 03, 2012 at 07:12 UTC ( #991372=note: print w/replies, xml ) Need Help??


in reply to Re^2: Simple Perl print() output redirect to html/webpage.
in thread Simple Perl print() output redirect to html/webpage.

This question really isn't in Perl-land any more, but a CGI question. This CGI script should do it:

#!/bin/sh echo "Content-Type: text/plain" echo ssh myusername@server1 ./script.pl arg

I'm not sure why your php solution did not work. Maybe you wanted the passthru function?

Replies are listed 'Best First'.
Re^4: Simple Perl print() output redirect to html/webpage.
by Anonymous Monk on Sep 03, 2012 at 07:24 UTC

    Beware, though. If you want to embed the script's output in HTML (instead of plaintext as I did there), you need to make sure that it doesn't contain any of the following characters: <>& (and maybe '"). Instead, escape them properly. For that, the pass-through function php supplies doesn't work.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991372]
help
Chatterbox?
[GotToBTru]: $; is "useful for emulating multi-dimensional arrays in Perl4"
[LanX]: i.e. &; is parsable
[LanX]: it's sometimes useful in P5 too
[LanX]: but I don't understand the question...
[GotToBTru]: okay, I see what it does
[GotToBTru]: you;ve answered it .. the expression is meant to be evaluated as written, it is not a symbol for a special operation
[LanX]: '&;@' is a parsing error
[GotToBTru]: by itself, yes, but used in sub pre(&;@) not so
[LanX]: &; is interpreted as a function call, but the @ has no meaning
[LanX]: OH

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-01-18 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (164 votes). Check out past polls.