On Friday, June 16, 2000, Peter Wemm wrote:
> How about that and as a stdin pipe as well if no args are specified?

   Well, I don't know about modifying the argument vector in Perl
(and I'd rather not find out how it behaves across various
circumstances), but:

     #!/usr/bin/perl -w
     
     my @arguments;                  # pseudo argument vector.
     
     push @arguments, @ARGV; 
     
     # if no file list is specified, read from the standard input
     push @arguments, "/dev/stdin" if !defined($arguments[0]);
     
     while (defined($arguments[0])) {
             system("ls -l " . $arguments[0]);
             shift @arguments;
     }

-- 
|Chris Costello <[EMAIL PROTECTED]>
|You buttered your bread, now lie in it.
`---------------------------------------


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to