On Thu, Mar 20, 2008 at 2:17 AM, Rajanikanth Dandamudi
<[EMAIL PROTECTED]> wrote:
>
>  Hi Chas. Owens,
>
>  Thanks a lot for the clarification. Finally I would like to understand how
> to find that the character \x{01} is getting printed. It is not visible onto
> the standard output display.
snip

That is because it is a control character (you might want to read up
on ASCII*, once you understand that you should take a look at
UTF-8**).  To see what is actually being sent to the screen you can
always say something like this:

perl your_script.pl  | perl -ne 'printf "[$_] is 0x%02x\n", ord for split //'

which outputs
[ ] is 0x20
[1] is 0x31
[ ] is 0x20
[=] is 0x3d
[ ] is 0x20
[1] is 0x31
[ ] is 0x20
[,] is 0x2c
[ ] is 0x20
[0] is 0x30
[ ] is 0x20
[,] is 0x2c
[ ] is 0x20
[] is 0x01
[ ] is 0x20
[2] is 0x32
[ ] is 0x20
[=] is 0x3d
[ ] is 0x20
[1] is 0x31
[ ] is 0x20
[,] is 0x2c
[ ] is 0x20
[0] is 0x30
[ ] is 0x20
[,] is 0x2c
[ ] is 0x20
[1] is 0x31

* http://en.wikipedia.org/wiki/Ascii#ASCII_control_characters
** http://en.wikipedia.org/wiki/Utf-8
-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to