I'm not sure exactly what you mean by isachar, since
that doesn't appear to be one of the ANSI C standard
functions. However, taking
Zaxo's code one step further:
sub isachar
{
return pop =~ /^[\x00-\x7F]/;
}
# Or alternatively
sub isalnum
{
return pop =~ /^\w/;
}
# As in:
$is = isachar('a');
Update:
crazyinsomiac pointed out "pop is not a variable", but it
is a quick way of retrieving the first element of
@_,
a.k.a.
$_[0].