Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I see this rather a lot on scripts I download, but I don't really understand it. Can anyone help? Thanks.
$foo =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: common replacement code ill-understood
by davido (Cardinal) on Jun 11, 2006 at 05:45 UTC | |
Re: common replacement code ill-understood
by Joost (Canon) on Jun 11, 2006 at 06:52 UTC | |
by ambrus (Abbot) on Jun 11, 2006 at 09:29 UTC | |
by BazB (Priest) on Jun 11, 2006 at 11:12 UTC | |
Re: common replacement code ill-understood
by planetscape (Chancellor) on Jun 11, 2006 at 19:50 UTC | |
Re: common replacement code ill-understood
by chromatic (Archbishop) on Jun 12, 2006 at 04:40 UTC |
Back to
Seekers of Perl Wisdom