1: package GlobArgv;
   2: use strict;
   3: 
   4: @ARGV = map { glob } @ARGV;
   5: 1;
   6: 
   7: __END__
   8: 
   9: =head1 NAME
  10: 
  11: GlobArgv - Enables Win32 One-Liners to Use Filename Wildcards
  12: 
  13: =head1 SYNOPSIS
  14: 
  15: perl -MGlobArgv -ne "print if /pattern/" *.csv
  16: perl -MGlobArgv -i.bak -pe "s/old/new/i" *.txt single.log
  17: 
  18: =head1 DESCRIPTION
  19: 
  20: Quick and dirty package to expand filenames containing
  21: wildcards passed as command line arguments. Win32 shells
  22: (CMD, 4NT) do not resolve wildcards by default.
  23: 
  24: A module is used to force the expansion of command line arguments
  25: before the implicit "while (<>)" loop.
  26: 
  27: =head1 BUGS AND LIMITATIONS
  28: 
  29: Very simple minded -- assumes everything on the command line
  30: is a filename that wants to be expanded.
  31: 
  32: =head1 AUTHOR
  33: 
  34: Keith S. Kiyohara, <kkiyohara@hotmail.com>
  35: 
  36: =cut
  37: 
  38: 

Replies are listed 'Best First'.
RE: GlobArgv - Enables Win32 One-Liners to Use Filename Wildcards
by t0mas (Priest) on May 26, 2000 at 10:32 UTC
    Cool. Looks like I've finally done my last readdir...
    /brother t0mas