diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-02 13:25:43 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-02 13:25:43 +0000 |
commit | e1caacb4fdb62cb28dc825ca0115faf95e569339 (patch) | |
tree | 82b5eb0dc32a568bebeaf78d402b2441de840112 /wince/bin/perlglob.pl | |
parent | 6f2ad931e2b0390c895341c3cd8e3fad2616118f (diff) | |
download | perl-e1caacb4fdb62cb28dc825ca0115faf95e569339.tar.gz |
Integrate the PerlCE (WinCE Perl) port;
kindly supplied by Rainer Keuchel <rkeuc@allgeier.com>.
p4raw-id: //depot/perl@11549
Diffstat (limited to 'wince/bin/perlglob.pl')
-rw-r--r-- | wince/bin/perlglob.pl | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/wince/bin/perlglob.pl b/wince/bin/perlglob.pl new file mode 100644 index 0000000000..17843c877a --- /dev/null +++ b/wince/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@activestate.com> + +=head1 SEE ALSO + +perl + +File::DosGlob + +=cut + |