Friday, September 25, 2015

Shift and Unshift Perl Program

Script:
@array = ("one", "two", "three");

unshift (@array, "zero");
print "@array \n";

shift (@array);

print "@array \n";

Output:

zero one two three

one two three

No comments:

Post a Comment