in reply to Cropping Elements in an Array

Here's one way to do it, using a regex to match the HH:MM:SS timestamp that occurs at the end of the date string.

use strict; my @dates; # read in @array, then .. foreach (@array) { # there is no doubt a more stylish way to do this, but ... #regex matches the part of $_ up to the point it finds the pattern # two digits followed by a colon (etc.) /(^.*?\d\d:\d\d:\d\d)/; # pushes the part of the string matched into the dates array push @dates, $1; }

Philosophy can be made out of anything. Or less -- Jerry A. Fodor