or$string =~ /^(.)/; $first_char = $1;
or@chars = split //, $string; $first_char = @chars[0];
but, in general, substr is the better option.$first_char = unpack 'a', $string;
In reply to Re: String extraction
by dsheroh
in thread String extraction
by matthxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |