in reply to Re^2: Counting devices types, device sizes and number of devices.
in thread Counting devices types, device sizes and number of devices.
The index of -1 means "last item", -2 would mean next to last one, etc.while (<DATA>) { my ($desc,$MB) = (split)[5,-1]; print "$desc $MB\n"; } =prints 2-Way 3 2-Way 3 2-Way 3 RAID-5 8632 RAID-5 8632 RAID-5 34526 2-Way 34526 2-Way 34526 2-Way 69052 RAID-5 34526 RAID-5 34526 RAID-5 69052 RAID-5 69052 BCV+R5 34526 BCV+R5 34526
|
|---|