On Sun, Nov 23, 2008 at 12:35 AM, Buzz Hill <buzzhill / verizon.net> wrote:
> Hi,
>
>
> Can someone explain the role of the "?" before the "x"
>
> s = "abcdefg"
> s[0] = ?x       # s == "xbcdef"
>
>
> I know this will accomplish the same thing.
>
>  s[0] = 'x'

sigma ~ % irb
s = "abcdefg"
# "abcdefg"
s[0] = ?x
# 120
?x
# 120
s
# "xbcdefg"
s[0] = 'x'
# "x"
s
# "xbcdefg"
'x'[0]
# 120
s[0]
# 120
s[0,1]
# 'x'
'x'[0,1]
# 'x'

^ manveru