Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    File::BSDGlob 0.94

    Download button

    No screenshots available
    Downloads: 368  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Nathan Torkington | More programs
    Perl Artistic License / FREE
    April 25th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    File::BSDGlob description

    File::BSDGlob is a Perl extension for BSD glob routine.

    File::BSDGlob is a Perl extension for BSD glob routine.

    SYNOPSIS

    use File::BSDGlob ':glob';
    @list = glob('*.[ch]');
    $homedir = glob('~gnat', GLOB_TILDE | GLOB_ERR);
    if (GLOB_ERROR) {
    # an error occurred reading $homedir
    }

    ## override the core glob (even with -T)
    use File::BSDGlob 'globally';
    my @sources =

    File::BSDGlob implements the FreeBSD glob(3) routine, which is a superset of the POSIX glob() (described in IEEE Std 1003.2 "POSIX.2"). The glob() routine takes a mandatory pattern argument, and an optional flags argument, and returns a list of filenames matching the pattern, with interpretation of the pattern modified by the flags variable. The POSIX defined flags are:

    GLOB_ERR

    Force glob() to return an error when it encounters a directory it cannot open or read. Ordinarily glob() continues to find matches.

    GLOB_MARK

    Each pathname that is a directory that matches the pattern has a slash appended.

    GLOB_NOCHECK

    If the pattern does not match any pathname, then glob() returns a list consisting of only the pattern. If GLOB_QUOTE is set, its effect is present in the pattern returned.

    GLOB_NOSORT

    By default, the pathnames are sorted in ascending ASCII order; this flag prevents that sorting (speeding up glob()).
    The FreeBSD extensions to the POSIX standard are the following flags:

    GLOB_BRACE

    Pre-process the string to expand {pat,pat,...} strings like csh(1). The pattern '{}' is left unexpanded for historical reasons (and csh(1) does the same thing to ease typing of find(1) patterns).

    GLOB_NOMAGIC

    Same as GLOB_NOCHECK but it only returns the pattern if it does not contain any of the special characters "*", "?" or "[". NOMAGIC is provided to simplify implementing the historic csh(1) globbing behaviour and should probably not be used anywhere else.

    GLOB_QUOTE

    Use the backslash ('') character for quoting: every occurrence of a backslash followed by a character in the pattern is replaced by that character, avoiding any special interpretation of the character.

    GLOB_TILDE

    Expand patterns that start with '~' to user name home directories.

    GLOB_CSH

    For convenience, GLOB_CSH is a synonym for GLOB_BRACE | GLOB_NOMAGIC | GLOB_QUOTE | GLOB_TILDE.

    The POSIX provided GLOB_APPEND, GLOB_DOOFFS, and the FreeBSD extensions GLOB_ALTDIRFUNC, and GLOB_MAGCHAR flags have not been implemented in the Perl version because they involve more complex interaction with the underlying C structures.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    BSD routine | glob routine | Perl module | File::BSDGlob | BSD | glob

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM