> > > Chris, > > You are exactly right, that is a useless use of cat, old habits die > hard. And of course you are correct in that it can be done entirely in > perl, the availability of the shell cmd wc makes us lazy, and we don't > want to code what we can just call from the system. > > Chris Hood >
Except laziness is a virtue, this is just insufficient code, not the "good" laziness. If you coded it up the way it *should* be done for portability, security, proper error handling, etc. it would in the end be longer. my @array; tie @array, 'Tie::File', $filename or die "Can't tie file: $!"; my $length = @array; Tough to beat.... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>