I'm not real sure about your $ENV problem, but using CGI.pm i can do the following:
#!/usr/bin/perl -w use CGI; use strict; print $q->header, $q->url(-absolute=>1, -path=>1, -query=>1);
I added ?file_url=//testdoc_dir/t1.txt&file_path=/u02/data/doc/test/t1.txt&43368 to the end of the URL which produced the following output:
/cgi-bin/temp/self.cgi?file_url=%2F%2Ftestdoc_dir%2Ft1.txt&file_path=% +2Fu02%2Fdata%2Fdoc%2Ftest%2Ft1.txt
HTH

Update: got rid of s/// and used the url method with some extra params. Also, you'll note that &43368 gets thrown away. adding an equals sign afterwards seems to keep it. *shrug*

Alternatively, you might write:
print $q->url(-absolute=>1, -path=>1), '?', $ENV{QUERY_STRING};
Which gives (note: unescaped URL)
/cgi-bin/temp/self.cgi?file_url=//testdoc_dir/t1.txt&file_path=/u02/da +ta/doc/test/t1.txt&43368


--
Rock is dead. Long live paper and scissors!

In reply to Re: REQUEST_URI from $ENV gets truncated by LTjake
in thread REQUEST_URI from $ENV gets truncated by Justudo

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.