Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2014nov11 Language: perl Q. How do I append an element to a perl array? A. Use push() like this:push(@a, 'new element');Note that push() works in-place. So do NOT do this:@a = push(@a, 'new element'); # WRONG, WRONG, WRONG
Add a commentSign in to add a comment