source:
trunk/essentials/dev-lang/perl/lib/getcwd.pl
| Last change on this file was 3181, checked in by , 19 years ago | |
|---|---|
| File size: 1.4 KB | |
| Line | |
|---|---|
| 1 | # By Brandon S. Allbery |
| 2 | # |
| 3 | # This library is no longer being maintained, and is included for backward |
| 4 | # compatibility with Perl 4 programs which may require it. |
| 5 | # |
| 6 | # In particular, this should not be used as an example of modern Perl |
| 7 | # programming techniques. |
| 8 | # |
| 9 | # Suggested alternative: Cwd |
| 10 | # |
| 11 | # |
| 12 | # Usage: $cwd = &getcwd; |
| 13 | |
| 14 | sub getcwd |
| 15 | { |
| 16 | local($dotdots, $cwd, @pst, @cst, $dir, @tst); |
| 17 | |
| 18 | unless (@cst = stat('.')) |
