1. Perl
  2. File operation
  3. here

Representation of the hierarchy above the directory ..

A directory has a special directory name (.) That represents itself and a special directory name (..) that represents a directory one level higher.

# A special directory name that represents its own directory
..

# A special directory name that represents a directory one level above
..

How to check. And ..

# For her command prompt on Windows
dir

# Unix, Linux shell
ls -a

With the above command, you can see that there are directory names. And .. in the directory.

Specific example

# Suppose you have the following directory structure.

| Module - - | t - - | test1.t
            | | test2.t
            |
            | lib - - | SomeModule1.pm
                      | SomeModule2.pm

# To represent the file name test1.t when the current directory is lib
../t/test1.t (for Unix)
..\t\test1.t (for Windows)
And.

# To represent the file name SomeModule1.pm when the current directory is t
../lib/SomeModule1.pm (for Unix)
..\lib\SomeModule1.pm (for Windows)
And.

Related Informatrion