$s = pop @{[@a]}; : pop « Array « Perl






$s = pop @{[@a]};

   

@a = (1, 2, 3);
$s = pop @{[@a]};

print "@a\n";

   
    
    
  








Related examples in the same category

1.Paper Stacks
2.The pop function pops off the last element of an array and returns it.
3.Pop value out of array
4.Push, pop, shift and unshift an array
5.Using Pop to remove element from an array