『Code Reading』より。
# Heuristic to see if we are running under Windows / DOS or Unix $windows = (-r 'nul' && !-r '/dev/null');