duh substr($str, 0, 1);
On Tue, 2009-09-01 at 20:49 -0400, Chuck Crisler wrote: > How do I access specific character positions in a scalar string? In case > it makes any difference, I specifically want to test the zeroth > character. Something like the following. > > my $str = "abc"; > if ($str[0] == '#') > { > do something... > } > > Thank you in advance! > Chuck > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/