bradcathey has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks,
A credit card authorization service is requiring name=value pairs where some of the names have #-signs in them. Using HTTP::Request::Common and LWP::UserAgent to POST the request, and, of course, Perl is unhappy. Tried escaping with crazy stuff like:
Anyway, for testing purposes, here's a stripped down version of what I'm trying to do:cata\#ofitem cata\x23ofitem cata%23ofitem
#!/usr/bin/perl; use strict; my %hash = ( partname => "large widget", cata#ofitem => "4321" ); print $hash{ 'cata#ofitem' };
...but only error messages. Google and Super Search weren't much help. perldata reminds us that variable names can only contain letters, number, and underscores. Ideas? TIA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to escape # sign in key name
by bmcatt (Friar) on May 13, 2004 at 16:42 UTC | |
|
Re: How to escape # sign in key name
by hardburn (Abbot) on May 13, 2004 at 16:56 UTC | |
|
Re: How to escape # sign in key name
by kvale (Monsignor) on May 13, 2004 at 16:44 UTC | |
|
Re: How to escape # sign in key name
by bradcathey (Prior) on May 13, 2004 at 16:53 UTC |