webstudioro,

Hay varios razones porque su ejemplo no funciona. Primera es que seria una violacion de seguridad si el webserver no prohibe cualquiera pagina de html ejecutar una script en cualquier directorio--alguien se puede escribir una script y ejecutarlo sin tener los permisos.

Segundo es que el html tag <script> necesita el atributo "type", y los valores permitidos no incluyen perl. Aqui esta detalles, pero en breve--<script> es solo para ordenar el cliente (typicamente un web browser) a ejecutar una script.

Perdoname mi castellano--hace muchas meses que escribia en la idioma, y nunca de sujectos tecnicos (que Ud. ya sospecha, pienso!).

Boy is my face red: I thought I saw Spanish in the OP and decided to try to show off. Teach me to write anything before coffee.

There are several reasons why your example doesn't work. First is that it would be poor security if the webserver allowed any old html page to exectute any old script in any directory--anyone could write a script and execute it without having the permissions to do so.

Second is that the html tag <script> requires the attribute "type" and the allowed values don't include perl. Here are the details, but in short--<script> is only for telling the client (typically a web browser) to execute code.

My apologies for my Spanish--it's been months since I've written in that language, and never on technical matters (as you probably suspect!).

Further attempt to atone for the above goof:

The tag you're probably looking for is:
<!--#exec cmd="command [arguments...]"-->
Note that your server has to be configured to allow this sort of thing.

Sweet jebus, I didn't notice he wants a JS solution. That's it, I'm going to go drink several cups of coffee and start over with PM today. Do me a favor and ignore this w/u.

AH

----------
Using perl 5.6.1 unless otherwise noted. Apache 1.3.27 unless otherwise noted. Redhat 7.1 unless otherwise noted.

In reply to Re: Problem to includ a perl file by alienhuman
in thread Problem to includ a perl file by webstudioro

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.