|
|
|
|
Joined: Mar 2001
Posts: 9
Junior Member
|
|
Junior Member
Joined: Mar 2001
Posts: 9 |
Hi! How to undo the changes of this code: Thanks a lot in advance 
|
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
Use CGI.pm instead of readparse. Once you have CGI.pm loaded, you have access to the urlencode method.
--mark
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
|
|
Joined: Mar 2001
Posts: 9
Junior Member
|
|
Junior Member
Joined: Mar 2001
Posts: 9 |
I don't want to use cgi.pm, because i'm not experienced with it. Isn't it possible to do this without using cgi.pm? All i want is a script that changes e.g. '# #' to '%23+%23', what must be simple...
|
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
|
Member
Joined: Feb 2000
Posts: 4,625 |
ReadParse is old. Its outdated. Use CGI.pm, its very easy.
|
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
Yes, you can do it with substitions, and pack etc.
But you really should learn CGI.pm (its not at all difficult). It is the standard for doing any CGI stuff in Perl.
--mark
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
|
|
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
|
|
P.I.T.A. / Programmer
Joined: Sep 2000
Posts: 755 |
Oops, my bad...it's been a while.
You want CGI.pm's esacape function
use CGI; my $q = CGI->new;
my $string = '# #'; print $q->escape($string);
outputs: %23%20%23
Or you could substitute the spaces for pluses first. --mark
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
|
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
|
Member
Joined: Feb 2000
Posts: 4,625 |
Thats what i said. 
|
|
|
|
|
Joined: Mar 2001
Posts: 9
Junior Member
|
|
Junior Member
Joined: Mar 2001
Posts: 9 |
Thanks a lot Mark! Works fine...
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,156
Joined: July 2001
|
|
|
Forums63
Topics37,583
Posts293,957
Members13,826
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 3075
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 30
|
|
|
|
|
|