Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm requiring a file from within my CGI script and it loads properly but the output data has a 1 at the very end. There is no 1 in the calling script or the script I am requiring, so how do I get rid of it?

I am just doing a simple  require "$script" or die "Error $!"; Inside the require'd file is the shebang, use warnings, use strict and print "test". No headers and no 1; at the end. I added the 1; at the end but it didn't change anything

Replies are listed 'Best First'.
Re: requiring a file
by liverpole (Monsignor) on Jul 16, 2006 at 22:52 UTC
    Can you post the *exact* text of your scripts?  There may be something trivial that you're not catching, but that having "many eyes" on the problem will find quickly.  (Think of it as a highly parallelized architecture with people instead of microprocessors ;-).

    If you can post both the calling script, and the required "$script", that would be the best.


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/