Re: use bytes

2004-05-19 Thread Simon Cozens
[EMAIL PROTECTED] writes: > use bytes; > $x = chr( 400 ); perldoc -f chr: Note that under the "bytes" pragma the NUMBER is masked to the low eight bits. -- "The elder gods went to Suggoth and all I got was this lousy T-shirt."

Re: use bytes

2004-05-19 Thread David Graff
[EMAIL PROTECTED] said: > I'm confused, can someone tell me why: > > #!/usr/bin/perl > use bytes; > $x = chr( 400 ); > print "Length is ", length( $x ), "\n"; > > prints 1, while > > #!/usr/bin/perl > $x = chr( 400 ); > use bytes; > print "Length is ", length( $x )