summaryrefslogtreecommitdiff
path: root/win32/bin
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-13 20:49:52 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-01-13 20:49:52 +0000
commitdfb634a9eac93365588858d3fa4687b4ce993eb7 (patch)
treeeabc0afebddd60be73c7c40cf1db9e9523ab4df5 /win32/bin
parentd07c2202867c84a305417e42e522ca39d055c62a (diff)
downloadperl-dfb634a9eac93365588858d3fa4687b4ce993eb7.tar.gz
[win32] fix perlglob.bat warnings by splitting it from File::DosGlob
p4raw-id: //depot/win32/perl@417
Diffstat (limited to 'win32/bin')
-rw-r--r--win32/bin/perlglob.pl53
1 files changed, 53 insertions, 0 deletions
diff --git a/win32/bin/perlglob.pl b/win32/bin/perlglob.pl
new file mode 100644
index 0000000000..6467e573b5
--- /dev/null
+++ b/win32/bin/perlglob.pl
@@ -0,0 +1,53 @@
+#!perl -w
+use File::DosGlob;
+$| = 1;
+while (@ARGV) {
+ my $arg = shift;
+ my @m = File::DosGlob::doglob(1,$arg);
+ print (@m ? join("\0", sort @m) : $arg);
+ print "\0" if @ARGV;
+}
+__END__
+
+=head1 NAME
+
+perlglob.bat - a more capable perlglob.exe replacement
+
+=head1 SYNOPSIS
+
+ @perlfiles = glob "..\\pe?l/*.p?";
+ print <..\\pe?l/*.p?>;
+
+ # more efficient version
+ > perl -MFile::DosGlob=glob -e "print <../pe?l/*.p?>"
+
+=head1 DESCRIPTION
+
+This file is a portable replacement for perlglob.exe. It
+is largely compatible with perlglob.exe (the Microsoft setargv.obj
+version) in all but one respect--it understands wildcards in
+directory components.
+
+It prints null-separated filenames to standard output.
+
+For details of the globbing features implemented, see
+L<File::DosGlob>.
+
+While one may replace perlglob.exe with this, usage by overriding
+CORE::glob with File::DosGlob::glob should be much more efficient,
+because it avoids launching a separate process, and is therefore
+strongly recommended. See L<perlsub> for details of overriding
+builtins.
+
+=head1 AUTHOR
+
+Gurusamy Sarathy <gsar@umich.edu>
+
+=head1 SEE ALSO
+
+perl
+
+File::DosGlob
+
+=cut
+