0

I like to convert the two variables and pass them into this url.

What is the best way to convert the string into gets string syntax for the url?

(UNIX_COMMAND AND PERLMAPHASHDATA)

thanks

my $PERLMAPHASHDATA = &MEC_GRAPH_DATA($APPENDIXDATA, $HASHDATA, $DOWNLOAD_FILE_PATH, \%USER_SELECTION);
my $UNIX_COMMAND = '/proj/gordon/runme.cgi -PERMAPHASH DATA';

print qq|
    <script>
        \$.get("scripts/DBD_SQLite/mysqlite_SAVE_SEARCH.cgi", function(data){\$("#tabs-112").html(data)});
    </script>
|;
3
  • 1
    I do not see where the variables $PERLMAPHASHDATA and $UNIX_COMMAND are used after declaration. Please amend your question with the relevant piece of code so the answers can be certain instead of guessing your intentions. Commented Jan 10, 2011 at 20:26
  • Also, the second piece of code looks like jQuery. How is that related to the issue? Commented Jan 10, 2011 at 20:30
  • yeah, I didn't use the PERLMAPHASHDATA AND UNIX_COMMAND VALUES yet. Commented Jan 11, 2011 at 16:46

1 Answer 1

2

It's not very clear what you are asking to do.

If you want to know how to take an arbitrary string and encode it so it's safe for use in URL string (URL/URI encoding, e.g. turning "=" into "%3D"), the usual Perl way to do it is URI::Escape module.

use URI::Escape;
$safe = uri_escape("10% is enough\n");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.