Re: custom splitting of string

2001-12-18 Thread Jenda Krynicky
> Jenda Krynicky wrote: > > > > "John W. Krahn" <[EMAIL PROTECTED]> suggested: > > > my @s = split //, $s; > > > > > > my @s = unpack 'a' x length $s, $s; > > > > > > my @s = $s =~ /./gs; > > > > > > push @s, substr $s, $_, 1 for 0 .. length $s - 1; > > > > > > push @s, chr vec $s, $_, 8 for 0 ..

Re: custom splitting of string

2001-12-17 Thread John W. Krahn
Jenda Krynicky wrote: > > "John W. Krahn" <[EMAIL PROTECTED]> suggested: > > my @s = split //, $s; > > > > my @s = unpack 'a' x length $s, $s; > > > > my @s = $s =~ /./gs; > > > > push @s, substr $s, $_, 1 for 0 .. length $s - 1; > > > > push @s, chr vec $s, $_, 8 for 0 .. length $s - 1; > > Als

Re: custom splitting of string

2001-12-17 Thread Jenda Krynicky
> "I.J." wrote: > > > > If I have a string > > $s='ABC'; > > how can I split it into one-char-long-element-array like > > @s=('A','B','C'); > > and, generally how can I access individual characters of a string > > variable? > "John W. Krahn" <[EMAIL PROTECTED]> suggested: > my @s = split //, $

Re: custom splitting of string

2001-12-16 Thread Paul Johnson
On Sun, Dec 16, 2001 at 06:19:40AM -0800, John W. Krahn wrote: > "I.J." wrote: > > > > If I have a string > > $s='ABC'; > > how can I split it into one-char-long-element-array like > > @s=('A','B','C'); > > and, generally how can I access individual characters of a string variable? substr() But

Re: custom splitting of string

2001-12-16 Thread John W. Krahn
"I.J." wrote: > > If I have a string > $s='ABC'; > how can I split it into one-char-long-element-array like > @s=('A','B','C'); > and, generally how can I access individual characters of a string variable? my @s = split //, $s; my @s = unpack 'a' x length $s, $s; my @s = $s =~ /./gs; push @s

custom splitting of string

2001-12-16 Thread I.J.
If I have a string $s='ABC'; how can I split it into one-char-long-element-array like @s=('A','B','C'); and, generally how can I access individual characters of a string variable? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]