$ ./comstruct.pl
1
2
3
red
blue
green
1 2 3 ARRAY(0x9393830)
$ ./comstruct2.pl
Row 3 column 2 is 15.
Deferencing with two loops.
0 2 4
4 1 32
12 15 17
Dereferencing with one loop.
0 2 4
4 1 32
12 15 17
Dereferencing a reference to reference.
32
$ ./comstruct3.pl
The first pet's name is Rover.
Printing an array of hashes.
owner -- Mr. Jones
name -- Rover
type -- dog
owner -- Mrs.Black
name -- Sysgaga
type -- cat
Adding a hash to the array.
owner -- Mrs.Crow
name -- Tweety
type -- bird
$ ./comstruct4.pl
Anna got 100 on the Math test.
Low's grade was changed to 100.
The nested hash of Mathh students and grades is: Hao 95 Anna 100 Ritta 85
Outer key: Science
Inner key: Lou -- Value: 90
Inner key: Low -- Value: 100
Inner key: vivi -- Value: 98
Inner key: Sam -- Value: 78
Outer key: Math
Inner key: Hao -- Value: 95
Inner key: Anna -- Value: 100
Inner key: Ritta -- Value: 85
]$ ./comstruct5.pl
$cience
piano flute harp
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |