Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

GlobArgv - Enables Win32 One-Liners to Use Filename Wildcards

by kiyohara (Novice)
on May 26, 2000 at 04:09 UTC ( #14899=perlcraft: print w/ replies, xml ) Need Help??

   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: 

Comment on GlobArgv - Enables Win32 One-Liners to Use Filename Wildcards
Download Code
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlcraft [id://14899]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2015-07-06 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (74 votes), past polls