in reply to Trimming whitespaces methods

If I'd stick to the s/// method, I'd prefer:

# remove leading/trailing whitespaces from array elem. w/o capturing s/ ^\s+ | \s+$ //gx for @array;

update:
shmem++ for being faster ;o)