Re: Windows paths in glob




Quoth Gunnar Hjalmarsson <noreply@xxxxxxxxx>:

A long time ago I decided to use opendir() and readdir() instead of
glob(). It may not be as 'elegant', but it works flawlessly without
escaping spaces.

To save Uri the trouble of pointing it out :), File::Slurp now has a
read_dir function.

Ben

.



Relevant Pages

  • Re: opendir and readdir vs glob iteration
    ... >>> you ever want to use opendir and readdir? ... The first time that glob is invoked, ... the full list is loaded into memory upon the first invocation. ...
    (comp.lang.perl.misc)
  • Re: open a file generated dynamically
    ... You will have to determine the actual file name first, e.g. by using glob() ... or opendir() and readdir() and then isolating the desired name from the ...
    (comp.lang.perl.misc)
  • Re: List folder contents as array
    ... perldoc -f opendir ... perldoc -f readdir ... perldoc -f glob ... opendir CURRENT, '.' ...
    (comp.lang.perl.misc)
  • Re: Newbie question. Get list of files in subdir.
    ... perldoc -f opendir ... perldoc -f readdir ... perldoc -f glob ...
    (comp.lang.perl.misc)
  • Re: opendir function.
    ... on betterwith the successive execution of the script ... readdir() in list context should be slightly faster than in scalar ... If your overall algorithm calls opendir() multiple times to descend ... closedir $dh; ...
    (comp.lang.perl.misc)