On 8/9/07, kapil.V <[EMAIL PROTECTED]> wrote: > echo > http%3A%2F%2Fwww.merifiles.com%2Fuploads%2Fmf_aR_Ek_Ajnabi_-_01_-_Ek_Ajnabi_%28Mama_Told_Me%29%28128Kbps%29.mp3| > perl -e ' > $_=<>;s/%(..)/\\x$1/xg; > print "$_"; > ' > > This outputs > http\x3A\x2F\x2Fwww.merifiles.com\x2Fuploads\x2Fmf_aR_Ek_Ajnabi_-_01_-_Ek_Ajnabi_\x28Mama_Told_Me\x29\x28128Kbps\x29.mp3 > > Why does print not print the hex character in question? > > But, > -bash-2.05b$ perl -e ' > > print > "http\x3A\x2F\x2Fwww.merifiles.com\x2Fuploads\x2Fmf_aR_Ek_Ajnabi_-_01_-_Ek_Ajnabi_\x28Mama_Told_Me\x29\x28128Kbps\x29.mp3" > > ' > http://www.merifiles.com/uploads/mf_aR_Ek_Ajnabi_-_01_-_Ek_Ajnabi_(Mama_Told_Me)(128Kbps).mp3-bash-2.05b$ > > outputs it. > > Thanks, > Kapil.V
Because '\' . 'x' . '2' . 'F' is not the same as "\x2F". Certain character sequences have meaning when they are included in a double quoted string, but that does not mean that the characters have the meaning in and of themselves. It is the act of putting them in a double quoted string that gives them their meaning. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/