At the time it returns undef, I examined $!You can only trust $! to contain something sensible immediately after a failed system call. (Which is something else than a call to system). Since cwd() calls pwd inside backticks, there's no system call, let alone a failed one (unless the fork() would fail, but then, time has passed). You may have more success in checking $?.
In reply to Re: backticks and 'Cannot allocate memory'
by JavaFan
in thread backticks and 'Cannot allocate memory'
by NetWallah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |