There is nothing much here that explains your problem. There are no print statements so I would not expect this bit to print anything. I would worry that the line

while (<$HTML>)
Is causing problems. The glob is nice in quick and dirty programs but if the file can not be found there is no error checking. This is much better for debugging:
open FILE, "<$HTML" or die "Oops opening $HTML, Perl says $!\n"; while (FILE) { .... } close FILE;

I would point out that from the security point of view using a user supplied full file name as you do allows the user to open any file on your system that your script has read acess to. Typically you hard code the path and only allow the user to supply the file name thus constraining them to one dir.

$path = "path/to/my/files"; $HTML =$q->param('file'); open FILE "<$path/$HTML" ....

I suggest changing the while structure to use an open and adding a debugging print to see that $_ actually contains what you expect within this loop.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Re: Re: Re: Re: Problem with CGI script not working (regex at fault) by tachyon
in thread Problem with CGI script not working (regex at fault) by deryni

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.