Perl Array Reverse() Function: Quick Tutorial

Perl Array Reverse() Function: Quick Tutorial

We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

Perl's reverse() function is used to reverse the order of an array. The function returns a reversed array but does not reverse the array.


reverse()returns @myNames = ('Jacob', 'Michael', 'Ethan', 'Andrew');

@reversedNames = reverse(@myNames);

@myNamesreverse()@[email protected]@reversedNames('Andrew', 'Ethan', 'Michael', 'Jacob')

, and @myNames remains the same.


  1. Ecgfrith

    Not a bad site, I especially want to highlight the design

  2. Peneus

    A very funny answer

  3. Pollux

    You are mistaken. I can prove it.Write to me in PM, we will discuss.

Write a message