@alphabets = (A .. F);
print "Original: @alphabets \n";
push (@alphabets, 'G'); # add G to the last index array
print "Pushing G in the array: @alphabets\n";
pop (@alphabets); # removing last element of array
print "Removing last element from array: @alphabets\n";
pop (@alphabets); # removing last element of array
print "Removing last element from array: @alphabets\n\n";
Showing posts with label push and pop in perl. Show all posts
Showing posts with label push and pop in perl. Show all posts
Thursday, October 20, 2022
push and pop in perl
Subscribe to:
Posts (Atom)