# Standard Library Module Test

test : printf() test : open() fprintf() getpid() close() "); if ($fd < 0) { echo("Error : $ERRMSG\n"); exit(1); } fprintf($fd,"This:Is:A::Test:\n"); fprintf($fd,"This:Is:Another::Test:\n"); close($fd); > test : readln() readtok() split() chop() 0) { printf("Element %d = '%s'\n", $numElements - 1, $array[$numElements - 1]); $numElements = $numElements - 1; } $tok = readtok($fd,":"); while($tok != "") { printf("Token = '%s'\n", chop($tok)); $tok = readtok($fd,":"); } close($fd); > First line = '$line' test : strseg() segment of '$text1' = '$text2' test : tr() sub() lowercase of '$text1' = '$text2' past tense of '$text3' = '$text4' test : chmod() unlink() stat() $mode test : substr() Substring = '$text2'

## Page Footer