When I use reverse() or sort() , I always need to store the return statement in a variable if I want to use it later.
@array=qw(Nick Susan Chet Dolly Bill); @array = reverse(@array);
Why is this different from using push() , pop() or shift() where you can just call a function and the array will be changed?
@array=qw(Nick Susan Chet Dolly Bill); push(@array, "Bruce");
So what is the difference between these "functions"?
push perl reverse
Sheldon cooper
source share