raj8 has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (arrays)
Any suggestions would help. thanks-- raj8drive 0 dirve 1 drive 2 drive 3 I am using this: open(LIST,"list -l|"); while(<LIST>) { ($drive) = unpack '@0 A3',$_; if(/Drive/) { $count++; } system("list -delete -dr -index ${count}"); }; However, when it gets to 3 it says can't delete 4 because the $i++ started at 1 instead of 0.
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I start incrementing an index at 0?⭐
by Adam (Vicar) on Sep 02, 2000 at 05:33 UTC |