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


in reply to Array Manipulation

G'day Jalcock501,

That's very little to go on. Here's one way to do it:

s/\.fo$// for @files;

Update (in response to your update): You're almost there with s/[.]fo//g. As you can see, is fairly close to what I posted (before you showed any code). Here's the differences:

For more details on any of those points, see "perlretut - Perl regular expressions tutorial" and/or "perlre - Perl regular expressions".

-- Ken