On Fri, 22 Jun 2001 00:55:28 -0700, Bruce Van Allen wrote: > @ARGV = grep {/^-s$/o and $sel = 1; $_ ne '-s' } @ARGV; # Same thing You're doing the same test twice: testing for $_ being "-s". IT would be better to combine them. @ARGV = grep { $_ ne '-s' or !($sel=1) } @ARGV; I'm not convinced that this is the most elegant expression, but it works. -- Bart.
- [MacPerl] re: Use of uninitialized value. Louis Pouzin
- [MacPerl] re: Use of uninitialized value. Bruce Van Allen
- [MacPerl] re: Use of uninitialized value. Bart Lateur
- [MacPerl] re: Use of uninitialized value. Chris Nandor
- [MacPerl] re: Use of uninitialized value. Louis Pouzin