passing "%20" in a url to Perl via CGI
Fraser Campbell
fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Fri Aug 6 12:59:33 UTC 2004
On August 6, 2004 08:44 am, Madison Kelly wrote:
> I'll be adding the "%25" substitute in now to test. A question
> though; would one of those 'pm' modules do this well:
>
> - I use 'ls' to pass the file names in a directory to perl
> - perl then pushes that file name to a postres db
> - later the file name is pulled back up and then 'rsync' is called using
> that file name.
> - through all of this the filename can be passed to the script over CGI
>
> I am not too familiar with 'pm' modules I'm afraid I'm not to sure
> how to use them properly yet. Also, would one of these modules help
> ensure that other special characters and possibly unicode characters in
> file names where properly handled, too? Thanks!
use URI::Escape;
$file = uri_escape($file);
Look at the URI::Escape manpage, there will be other modules (perhaps better)
URI::Escape is just the one that I am familiar with.
--
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org> http://www.wehave.net/
Georgetown, Ontario, Canada Debian GNU/Linux
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list