home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


8.72 File::DosGlob

Provides a portable enhanced DOS-like globbing for the standard Perl distribution. DosGlob lets you use wildcards in directory paths, is case-insensitive, and accepts both backslashes and forward slashes (although you may have to double the backslashes). Can be run three ways:

  • From a Perl script:

    require 5.004
    use File::DosGlob 'glob';
    
    @perlfiles = glob  "..\pe?l/*.p?";
    print <..\pe?l/*.p?>;

  • With the perl command, on the command line:

    # from the command line (overrides only in main::)
    % perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"

  • With the perlglob.bat program on the DOS command line:

    % perlglob ../pe*/*p?

When invoked as a program from the command line, File::DosGlob prints null-separated filenames to STDOUT.


Previous: 8.71 File::Copy Perl in a Nutshell Next: 8.73 File::Find
8.71 File::Copy Book Index 8.73 File::Find

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.