Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 having an uproarious good time at the Monastery: (19)
As of 2014-09-22 16:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls