siva said:
Please put the subject of your post in the Subject of your post. Your
post is not about doubting perl code. Your post is about '\\' and '..'
what is the meaning of
my $DIRDEPTH = "..\\..\\..";
what is the meaning of \\ and .. in perl?
In a normal string, .. has no special meaning of any kind. Those are
simply two periods.
The \ is a special character. It starts an escape sequence. It makes
non-special characters special (for example, a \n means "newline"). It
also makes special characters non-special. In this case, the first \
is used to make the second \ non-special. Therefore, "\\" simply means
a single backslash.
The above string looks to be a directory location, going three levels
up from the current directory.
If you post some more context, we can probably help you figure out what
the specific chunk of code is actually doing.
Paul Lalli