|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have written a Perl script to convert ringtones for my web site, it takes input as follows
Nokring:d=16,o=5,b=63:c,32p,c,32p,c,g,4p,g,32p,g,8d#,48d.,48d#.,48d.,32p,c,32p,c,32p,c,g,4p,g,32p,g, 8d#,48d.,48d#.,48l.,32p,48c.,32p,48c.,48c.,32p,48c.,48c.,32p,d,48d#.,32p,d,48d#. The problem is I want the script invoked from a text hyperlink so I have the HTML code as follows <a href="http://www.ringtones4all.com/cgi/nok2eric.cgi?nokring=Nokring:d=16,o=5,b=63:c,32p,c,32p,c,g,4p,g,32p,g,8d#,48d.,48d#.,48d.,32p,c,32p, c,32p,c,g,4p,g,32p,g,8d#,48d.,48d#.,48l.,32p,48c.,32p,48c.,48c.,32p,48c.,48c.,32p,d,48d#.,32p,d,48d# ."> Ericsson</a></td> When I run the perl script in Dsofts Perl editor(which by the way is a great program) it works ok, when I run it on the web it reads in Nokring:d and then stops at the = I have tried enclosing the string in Quotes (single and Double) any ideas My only other idea was to use a form to submit the data using a field but I want the link that invokes the script to be ran from a text link rather than a submit button Any ideas ??? Mike |
|
#2
|
|||
|
|||
|
Consider using different characters for the equals sign (maybe an X) in your link and then in your perl script use something like...
$var =~ tr/X/=/; ...to get your equals signs back if your script requires them. I know this isn't the most elegant solution, but perhaps it will be simple enough to serve your needs. Good luck. Bob |
|
#3
|
|||
|
|||
|
I am guessing you wish to format the data into a GET .
The GET must be URL encoded to work on the web. I am expect your software interprets this like command line data, so it works. To create a url encoded string try this: Make an HTML form with method=get and add all your named inputs and their values. Submit this to a cgi that will just respond. Now look at your Url bar , does this contain your get info. If so you will see a URL encoded string conataining all your name / value pairs. Else search for a URL Variables on the web and manually substitute the characters....... Good Luck Foot in Mouth ver 1.00 ![]() |
|
#4
|
|||
|
|||
|
Thanks for this, becasue I want the links to appear as a peice of text in a table I have just done the simple substition which has worked fine
I guess sometimes the simplest solutions are the easiest and are overlooked thanks again Mike |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Using HTML Hyperlinks to start a Perl Script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|