我是新手。这个我有。。
%categories = (
'Announcements' => ['Auctions', 'Bands-Seeking-Members', 'Boutiques', 'Charity'],
'Appliances' => ['Dishwashers', 'Fireplaces/Wood-Burning-Stoves', 'Microwaves'],
'Auto-Parts-and-Accessories' => ['Auto-Accessories', 'Car-Audio-and-Video],
'Baby' => ['Baby-Clothing', 'Backpacks-and-Carriers', 'Changing', 'Cribs-and-Playpens'],
'Books-and-Media' => ['Blu-ray-Discs', 'Books:-Children'],
'Clothing-and-Apparel' => ['Boys-Clothing', 'Boys-Shoes', 'Costumes']
);
我需要它来打印这个..
• Announcements
-Auctions
-Bands-Seeking-Members
-Boutiques
-Charity
•Appliances etc
这是到目前为止的代码..
while( my ($cat,$subcat) = each %categories) {
print qq~• $cat
~;
print qq~- $subcat
~;
}
正在打印这个..
• Clothing-and-Apparel
- ARRAY(0x1e959c0)
• Announcements
- ARRAY(0x1e95590)
• Auto-Parts-and-Accessories
- ARRAY(0x1e95740)