in reply to Scalar looses values outside foreach loop

Instead of grep {/2010*/}, you probably meant grep {/2010.*/}. Or do you really want to include files from 2011?

Replies are listed 'Best First'.
Re^2: Scalar looses values outside foreach loop
by ww (Archbishop) on Dec 02, 2010 at 14:59 UTC
    Actually, more like files from 201.
    >perl -e "my $foo=\"201 AD\"; if ($foo =~ /(201*)/) {print $1 . \"\n\" +;}" 201

    CE or BC is undefined.

    But in either 201 (undef), most files were papyrus or clay tablets. It's really hard to grep thru those.