I think you are missing the closing `.
-----Original Message----- >From: Tony Frasketi <[EMAIL PROTECTED]> >Sent: Sep 21, 2006 10:25 AM >To: beginners@perl.org >Subject: PACK statement compile error > >Hello list. >I'm getting the following error message when compiling the program >listed below ... > > Bad name after c' at /test/test1.cgi line 22. > >line 22 is ' s/%(..)/pack('c', hex($1))/eg;' > >Need help in eliminating this error! >thnx >tony > >========= >#!/usr/local/bin/perl -w > >use strict; > ># Enable HTTP output >print("Content-type: text/html\n\n"); > >my $url = "nice.cgi?a=b+c+d&x=a+m"; >my $x = &decodeURL($url); >print 'x[$x]<br>"; > >exit; > > >#------------------------------------------------------------- ># Decode the URL ># &decoded_url = &decodeURL($url); >#------------------------------------------------------------- >sub decodeURL { > $_ = shift; > tr/+/ /; > s/%(..)/pack('c', hex($1))/eg; > return($_); >} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>