in reply to Re^2: ARGV *.* importing problems
in thread ARGV *.* importing problems

While it is true that the documentation says that, consider:
my @files = glob('C:/Program Files/*'); print "@files\n";
gives:
C:/Program
whereas:
use File::Glob qw(glob); my @files = glob('C:/Program Files/*'); print "@files\n";
gives:
C:/Program Files/7-Zip C:/Program Files/ATI C:/Program Fil...
etc. ad nauseum.
This on ActiveState perl 5.12.3 64-bit Windows 7, but has been the same siince at least 5.6.0. I get similar results on Linux on 5.8.8.

Replies are listed 'Best First'.
Re^4: ARGV *.* importing problems
by choroba (Cardinal) on May 02, 2011 at 12:59 UTC
    The documentation also says
    See File::Glob for details
    And if you do, you can see this:
    ## override the core glob (CORE::glob() does this automatically ## by default anyway, since v5.6.0) use File::Glob ':globally'; my @sources = <*.{c,h,y}>;
    But this piece of code does not behave like File::Glob::glob (namely, it does not call bsd_glob instead of glob). The question is: What exactly does CORE::glob automatically since 5.6.0 then?
      Good point, but this brings us back to my original comment that File::Glob is safer. Whether that is how it should be is another question altogether.