问一道题目

4 views
Skip to first unread message

per...@live.cn

unread,
Jun 30, 2011, 1:43:39 AM6/30/11
to perlchina
hi:
  大家好,我想问一道题目,原本是要求用shell实现的,我想问问用perl如何实现:
如下:
品牌     产品编号     价格
A           001             10
A           002             20
A           003             30
B           004             40
B           005             50
C           006             60
C           007             70
需要得到如下结果
A产品编号   A价格       B产品编号    B价格        C产品编号     C价格
001             10             004             40             006             60
002             20             005             50             007             70
003             30
 
2011-06-30

Matthew

unread,
Jul 1, 2011, 9:34:30 PM7/1/11
to perl...@googlegroups.com
正在看小骆驼书学习中,生成报表我还没学,目前认为这个要用哈希,用正则应该也可以。

x2x4

unread,
Jul 1, 2011, 11:53:02 PM7/1/11
to perl...@googlegroups.com

$hash->{A}->[0]->{001}=10

> --
> 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
> 要向此网上论坛发帖,请发送电子邮件至 perl...@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 perlchina+...@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

Reply all
Reply to author
Forward
0 new messages