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
In reply to Re: First Unix Admin Script - Request for Constructive Critisism
by graff
in thread First Unix Admin Script - Request for Constructive Critisism
by D.Millin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |