Loading ...
Sorry, an error occurred while loading the content.

Re: Files and Perl for Windows

Expand Messages
  • Damien Carbery
    ... If you go into any directory there are always two directory entries: . and .. . points to the current directory .. points to the parent directory.
    Message 1 of 5 , Dec 1, 2003
    • 0 Attachment
      --- In perl-beginner@yahoogroups.com, "Yevgueny" <dneprbeb@y...> wrote:
      > --- In perl-beginner@yahoogroups.com, "Yevgueny" <dneprbeb@y...>
      > wrote:
      > > Help me, please, with this small problem. I just want to get a list
      > > of files in a directory.
      > >
      > > opendir (DIR, "C:\\APP");
      > > foreach (readdir (DIR)) {
      > > print "$_\n";
      > > }
      > > closedir (DIR);
      > >
      > > So, in Win2000 I get something a kind of this:
      > > .
      > > ..
      > > BC520RTL.DLL
      > > FPHELP.GID
      > > FPHELP.HLP
      > >
      > > When I do the same in Win98 I can't get the filenames at all and
      > see
      > > only:
      > > .
      > >
      >
      > I can't get why do those dots appear? Moreover, they go as
      > directories. What do they mean?

      If you go into any directory there are always two directory entries:
      '.' and '..'
      '.' points to the current directory
      '..' points to the parent directory. In the root directory it points
      to the current directory.

      I think they exist to allow you to move up and down directories i.e.
      like links on a linked list, without them you won't know how to get
      from one directory to another.
      Someone else can probably explain it much more thoroughly. In the
      meantime you might be able to find something on the web.
    Your message has been successfully submitted and would be delivered to recipients shortly.