A pair of bugs:
A) $! is always 25 (ENOTTY), regardless of what I've just done.
The documentation says it should contain "the current value
of errno, with all the usual caveats". I think I understand how
things interract with errno, but I can't explain this one.
B) Certain kinds of variable references misbehave when imbedded in a
string:
"this $#ARGV in a string" prints "this ARGV in a string"
"this $_[$i] in a string" prints "this <whole line>[i] in a string"
where <whole line> is the current input record; others are literals.
Now for some things that are sadly lacking:
1) There is no perror() mechanism. I would like to be able to say
die "$file: $SYSERR[$!]" unless open(fd,$file);
2) There is no mechanism for internal file globbing. Saying
@manfiles = split(' ',`ls /usr/man/man?/$arg.* 2> /dev/null`);
is such an overkill -- plus I must check $? as the bourne shell
returns the unglobbed string if it makes no match.
3) It would be nice if $ENV{'SHELL'} would be honored for `evals`.
4) There is no mechanism for "if" tests, like -e, -x, -w, -d, ...
Using the `eval` mechanism is clumsy, inefficient, and sometimes
impossible. For example,
if ( `if [ -e a* 2> /dev/null ]; then echo 1; fi` ) {
will succeed for just ONE a* file, not zero or more than one.
5) I wish I didn't have to use two statements for this:
$hours = $_[3];
$hours =~ s/:.*//;
I would like to say
$hours = $_[3] =~ s/:.*//;
but in this context, perl says it's is a pattern-compare and returns
one or zero.
6) You can link but not symlink; if you're a BSD system this should be
possible.
7) I've had trouble with the array/scalar notation, as well as not
always being certain whether to use a $ or @ at all. I've always
worked it out, but it's somehow not very intuitive. Has anyone else
had this problem?
--tom
Tom Christiansen
CONVEX Computer Corporation
UUCP: ...{ihnp4,uiucdcs,ut-sally,sun}!convex!tchrist (america)
UUCP: ...{mcvax!{nlcvx,inria}!cvxfr,connie,eurodem}!convex!tchrist (europe)
ARPA: convex!tch...@sally.utexas.edu
BELL: (214) 952-0447 (office)