【发布时间】:2014-02-11 13:22:23
【问题描述】:
我在一个文件 teams.txt 中有几个团队,如下所示:
team1 = {bob marc steve}
team2 = {john maria}
我可以根据自己的喜好更改文件格式。
现在我需要找出一个球员,比如鲍勃,属于哪支球队。
到目前为止,我使用的是open file -> while -> match pattern。
我想知道我是否可以重新格式化文件 teams.txt 并使用 Config::General 或 来自 cpan 的任何其他先入为主的工具。
请让我享受很多新的想法! (使用 perl 5)
【问题讨论】: