Mass Deface
s and are thus B Unicode aware (and hence
deprecated unless you B you should use them) and the other type
deal in Cs and know about Unicode properties. In the following
table, C is a C, and C is a Unicode codepoint.
Instead Of: Use: But better use:
isalnum(c) isALNUM(c) isALNUM_uni(u)
isalpha(c) isALPHA(c) isALPHA_uni(u)
iscntrl(c) isCNTRL(c) isCNTRL_uni(u)
isdigit(c) isDIGIT(c) isDIGIT_uni(u)
isgraph(c) isGRAPH(c) isGRAPH_uni(u)
islower(c) isLOWER(c) isLOWER_uni(u)
isprint(c) isPRINT(c) isPRINT_uni(u)
ispunct(c) isPUNCT(c) isPUNCT_uni(u)
isspace(c) isSPACE(c) isSPACE_uni(u)
isupper(c) isUPPER(c) isUPPER_uni(u)
isxdigit(c) isXDIGIT(c) isXDIGIT_uni(u)
tolower(c) toLOWER(c) toLOWER_uni(u)
toupper(c) toUPPER(c) toUPPER_uni(u)
=head2 F functions
Instead Of: Use:
atof(s) Atof(s)
atol(s) Atol(s)
strtod(s, &p) Nothing. Just don't use it.
strtol(s, &p, n) Strtol(s, &p, n)
strtoul(s, &p, n) Strtoul(s, &p, n)
Notice also the C, C, and C functions in
F for converting strings representing numbers in the respective
bases into Cs.
In theory C and C may not be defined if the machine perl is
built on doesn't actually have strtol and strtoul. But as those 2
functions are part of the 1989 ANSI C spec we suspect you'll find them
everywhere by now.
int rand() double Drand01()
srand(n) { seedDrand01((Rand_seed_t)n);
PL_srand_called = TRUE; }
exit(n) my_exit(n)
system(s) Don't. Look at pp_system or use my_popen
getenv(s) PerlEnv_getenv(s)
setenv(s, val) my_putenv(s, val)
=head2 Miscellaneous functions
You should not even B to use F functions, but if you
think you do, use the C stack in F instead.
For C/C, use C.
=head1 SEE ALSO
L, L, L