in reply to RE: RE: RE: Increment
in thread Increment
I then used the following to fix the code. If you see a more elegant way of putting multiple next unless statements-- please feel free to flame me. Thanks for your help. The code is shown below:C:\>tpconfig -l Device Robot Drive Robot Drive Device Type Num Index Type DrNum Status Comment Name Path robot 0 - TLD - - - - \\.\Scsi6 +:
sub delete_drives3 { my $drive; $count = -1; open(TPCONFIG,"tpconfig -l|"); while(<TPCONFIG>) { ($drive) = unpack '@0 A5',$_; next if /^r/; next if /^D/; next if /^T/; ++$count; print "Deleting drive $count\n"; system("tpconfig -delete -drive -index ${count}"); }; };
|
|---|