|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /installd/perl588installer/perl-5.8.8/wince/bin/ |
Upload File : |
#!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