#--------------------------------------------------------------------- # $Id: Wild.pm 1.1 2002/06/08 13:52:07 Madsen Exp Madsen $ # # Copyright 2002 Christopher J. Madsen # # Author: Christopher J. Madsen # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the # GNU General Public License or the Artistic License for more details. # # Emulate shell @ARGV expansion on shells that don't #--------------------------------------------------------------------- use File::DosGlob 'glob'; { my $loaded; @ARGV = map { if (!/^-/ and /[*?]/) { do { require MSDOS::Attrib; $loaded = 1; } unless $loaded; s/([\' ])/\\$1/g; grep {MSDOS::Attrib::get_attribs($_) !~/[HS]/} File::DosGlob::glob($_); } else { $_ } } @ARGV; } 1;