How do i use the shift operator in perl code?
-
Also, see: What do the shift and unshift operators do in perl?
$selection = shift(@animals);
- $selection has value lion, indexes have moved along.
- Arrary @animal, now has tiger, bear, and monkey
© Lightnetics 2024