2011年10月11日 星期二

Perl arrow operator (makes more complex structures easier to read)

my $array_ref = ['apple', 'banana', 'orange'];
print "My first fruit is: " . $array_ref->[0] . "\n";
#show the result :My first fruit is: apple

沒有留言:

張貼留言