というときはperldoc -v
を使う。
全部見たいときはperldoc perlvar
から探しても良い。
例
$ perldoc -v '$!'
$OS_ERROR
$ERRNO
$! When referenced, $! retrieves the current value of the C "errno"
integer variable. If $! is assigned a numerical value, that value
is stored in "errno". When referenced as a string, $! yields the
system error string corresponding to "errno".
Many system or library calls set "errno" if they fail, to indicate
the cause of failure. They usually do not set "errno" to zero if
they succeed. This means "errno", hence $!, is meaningful only
immediately after a failure:
if (open my $fh, "<", $filename) {
# Here $! is meaningless.
...
}
else {
# ONLY here is $! meaningful.
...
# Already here $! might be meaningless.
}