[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > I have a rather large group of files (~5000) that I would like to sort > > into directories by date. Initially by year, then perhaps later by > > year/month. > > > > I'm looking at the -M operator, but it seems like that would require you > > find the number of days of the year, today is, then do the math. > > > > I'm wondering if there isn't a more efficient method. > > What you probably need is something like this: > > > my ( $mon, $year ) = ( localtime( ( stat $filename )[ 9 ] ) )[ 4, 5 ]; > $mon++; > $year += 1900; > > Thanks John, this might be exactly what I'm looking for. Thanks, Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>