#!/usr/bin/perl
# 创建一个简单是数组
@sites = ("google","W3xue","taobao");
print "1. \@sites = @sites\n";
# 在数组结尾添加一个元素
push(@sites, "baidu");
print "2. \@sites = @sites\n";
# 在数组开头添加一个元素
unshift(@sites, "weibo");
print "3. \@sites = @sites\n";
# 删除数组末尾的元素
pop(@sites);
print "4. \@sites = @sites\n";
# 移除数组开头的元素
shift(@sites);
print "5. \@sites = @sites\n";