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
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.