d****i 发帖数: 4809 | 1 Perl里面,有一个数组如下:
@array=(
10 A
11 B
12 C
...);
就是$array[i]的第一列是数字,第二列是字母,请问有什么办法可以把array的每个
element的第一列和第二列分别提取出来?就是在indexing $array[i]的时候,要提取
第一列有什么办法?谢谢。 | c**t 发帖数: 2744 | 2 if the numbers are different, you may cast the array to a hash, then the
keys are the first column, values will be the 2nd
【在 d****i 的大作中提到】 : Perl里面,有一个数组如下: : @array=( : 10 A : 11 B : 12 C : ...); : 就是$array[i]的第一列是数字,第二列是字母,请问有什么办法可以把array的每个 : element的第一列和第二列分别提取出来?就是在indexing $array[i]的时候,要提取 : 第一列有什么办法?谢谢。
| d****i 发帖数: 4809 | 3 Thanks. Could you tell me how to cast the array to a hash? I'm a cai niao in
Perl. Thanks.
【在 c**t 的大作中提到】 : if the numbers are different, you may cast the array to a hash, then the : keys are the first column, values will be the 2nd
|
|