in reply to First Unix Admin Script - Request for Constructive Critisism
If the intention is to read the contents of one or more files named on the command line, this is usually expressed as just:while (<@ARGV>) { ... }
When you do it this way, you are free to choose whether to name input files as command line args, or to pipe data to the script from some other process instead -- that is, the following two usages would be equivalent:while (<>) { ... }
That's a dumb example, but the point is that if you happen to use some other process to generate those files, you could do:your_script file1 file2 file3 cat file1 file2 file3 | your_script
It's just a nice kind of flexibility to have.other_process | your_script
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: First Unix Admin Script - Request for Constructive Critisism
by D.Millin (Beadle) on Feb 08, 2003 at 23:08 UTC |