[oclug] Perl golf: 10 day file problem (was Re: [linux-novice] Re: Help with my self-imposed home work)

Adrian Irving-Beer wisq-oclug at wisq.net
Tue Mar 1 15:14:00 EST 2005


On Tue, Mar 01, 2005 at 01:17:10PM -0500, Dave O'Neill wrote:

> This may be getting off-topic for the linux-novice list, but...

Agreed.  Taking it to the main list, because even though I think we've
reached the shortest form, that's what I thought last time, too. ;)

>    perl -le '-d||-M>10/24||print$_ for at ARGV' *

Wow, nice.  I also didn't  know about -M, although you mean -M>10
since it's in days. 

I also noticed just after I posted mine that you can reduce it to

     perl -le '-d||-M>10||print for at ARGV' *

since 'print' assumes $_.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20050301/993596df/attachment.bin


More information about the OCLUG mailing list