< Perl Programming < Keywords
The unshift keyword
unshift does the opposite of shift. It prepends list to the front of the array and returns the new number of elements in the array.
Syntax
unshift ARRAY, LIST
unshift EXPRESSION, LIST
Example
unshift(@ARGV, '-e') unless $ARGV[0] =~ /^-/;
See also
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.