use File::Spec; chdir File::Spec->updir;
There's nothing special about chdir. If you give it an absolute path, it'll attempt to change your current directory to that absolute path. If you give it a relative path, it'll attempt to change your current directory to that relative path. (The relative path for "parent of the current directory" is probably .., but if you want to be very cross-platform paranoid, use File::Spec.)
In reply to Re: How to move up 1 directory ?
by chromatic
in thread How to move up 1 directory ?
by palkia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |