$lookfor=<STDIN>; chop($lookfor); if ($lookfor =~ /year/i){ for $list_ref1 ( sort { $a->[0] cmp $b->[0] } @inventory ) { print "\t [ @$list_ref1 ],\n"; } } if ($lookfor =~ /make/i){ for $list_ref1 ( sort { $a->[1] cmp $b->[1] } @inventory ) { print "\t [ @$list_ref1 ],\n"; } }
In reply to Re^2: Inventory List Sorting Question
by fufaso
in thread Inventory List Sorting Question
by fufaso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |