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

My below query was solved. please refer stackoverflow
http://stackoverflow.com/questions/32385729/how-to-pass-filepath-as-a-parameter-to-url-using-perl
I am testing my perl code. I want to pass filepath as a paramter to the URL of the page. The perl code is dependent on this filepath entirely. When i set the filepath inside my perl code. (hard coded path), i am able to execute the perl code without any errors. Here is the variable     my $filename="\\\\sfoaepmdata.dcc.com\\folder\\data.txt"; If i pass it via URL, it doesnt work as expected. Can anyone suggest how to pass filepath as a variable in the URL ? Here is what all i tried to someohow transfer $filename from url to perl code.
http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=\\\\sfoaepmd +ata.dcc.com\\folder\\data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=\\sfoaepmdata +.dcc.com\folder\data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=//sfoaepmdata +.dcc.com/folder/data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=////sfoaepmda +ta.dcc.com//folder//data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=file://sfoaep +mdata.dcc.com/folder/data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=file:////sfoa +epmdata.dcc.com//folder//data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=http:////sfoa +epmdata.dcc.com//folder//data.txt http://apmqa.dcc.com/cgi-bin/test/editor.pl?filename=http://sfoaep +mdata.dcc.com/folder/data.txt
The above data may seem confusing. But please only read values after ?filename. Can anyone pls suggest. I also tried passing other normal paramters and it worked. for e.g. $account=GEL; the filepath doesnt work.
http://apmqa.dcc.com/cgi-bin/test/editor.pl?account=GEL

Replies are listed 'Best First'.
Re: How to pass filepath as a parameter to URL using perl
by choroba (Cardinal) on Sep 03, 2015 at 22:35 UTC
    Crossposted at StackOverflow. It's considered polite to inform about crossposting so the people not attending both the sites don't waste their time hacking a solution for a problem already solved at the other end of the internet.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: How to pass filepath as a parameter to URL using perl
by Corion (Patriarch) on Sep 03, 2015 at 21:59 UTC

    How do you get $filename from the URL?

    What is the error message you get?

Re: How to pass filepath as a parameter to URL using perl
by ww (Archbishop) on Sep 03, 2015 at 23:12 UTC

    Simplify; clarify!

    IOW, present a concise, compilable piece of code that illustrates your problem. (Non-concise: all the references to 'http://apmqa.dcc.com/cgi-bin/test/editor.pl' which do nothing useful to clarify your problem.)


    Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
    1. code
    2. verbatim error and/or warning messages
    3. a coherent explanation of what "doesn't work actually means.