http://www.perlmonks.org?node_id=878992


in reply to Re^2: How do remove trailing data?
in thread How do remove trailing data?

If you can overwrite the existing array values you can use following for the complete if block. You need not write if as the loop will run only if arrays are not empty

s/#\d+$// for (@changed_files, @newlyinsertedfiles, @branchedfiles);
--
Regards
- Samar