use strict;
use warnings;
use utf8;
my @city = ("tokyo", "osaka");
print "array-->:\n";
for (my $i = 0; $i <= $#city; $i++){
print "$city[$i]\n";
}
my $val = shift(@city);
print "\nget-->:\n";
print "$val\n";
print "the rest-->:\n";
for (my $i = 0; $i <= $#city; $i++){
print "$city[$i]\n";
}
use warnings;
use utf8;
my @city = ("tokyo", "osaka");
print "array-->:\n";
for (my $i = 0; $i <= $#city; $i++){
print "$city[$i]\n";
}
my $val = shift(@city);
print "\nget-->:\n";
print "$val\n";
print "the rest-->:\n";
for (my $i = 0; $i <= $#city; $i++){
print "$city[$i]\n";
}