This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quick integration of mainline changes to date
[perl5.git] / win32 / bin / perlglob.pl
CommitLineData
dfb634a9
GS
1#!perl -w
2use File::DosGlob;
3$| = 1;
4while (@ARGV) {
5 my $arg = shift;
6 my @m = File::DosGlob::doglob(1,$arg);
7 print (@m ? join("\0", sort @m) : $arg);
8 print "\0" if @ARGV;
9}
10__END__
11
12=head1 NAME
13
14perlglob.bat - a more capable perlglob.exe replacement
15
16=head1 SYNOPSIS
17
18 @perlfiles = glob "..\\pe?l/*.p?";
19 print <..\\pe?l/*.p?>;
20
21 # more efficient version
22 > perl -MFile::DosGlob=glob -e "print <../pe?l/*.p?>"
23
24=head1 DESCRIPTION
25
26This file is a portable replacement for perlglob.exe. It
27is largely compatible with perlglob.exe (the Microsoft setargv.obj
28version) in all but one respect--it understands wildcards in
29directory components.
30
31It prints null-separated filenames to standard output.
32
33For details of the globbing features implemented, see
34L<File::DosGlob>.
35
36While one may replace perlglob.exe with this, usage by overriding
37CORE::glob with File::DosGlob::glob should be much more efficient,
38because it avoids launching a separate process, and is therefore
39strongly recommended. See L<perlsub> for details of overriding
40builtins.
41
42=head1 AUTHOR
43
146174a9 44Gurusamy Sarathy <gsar@activestate.com>
dfb634a9
GS
45
46=head1 SEE ALSO
47
48perl
49
50File::DosGlob
51
52=cut
53