• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

Reading Files in Perl

Hi,

Can anyone help me with a code snippet to read  recursively dir and sub dir from a path and grep them by yesterday's date.

0
new_perl_user
Asked:
new_perl_user
  • 2
  • 2
1 Solution
 
ozoCommented:
use File::Find;
find(sub{print if -d && (-M) < 2},"/path");
0
 
new_perl_userAuthor Commented:
Hi,

Thank you it is working to an extent but it is printing out all the folders within a Sun dire too.
 Is there a way to print out only till Subdir level.

0
 
new_perl_userAuthor Commented:
Can you please suggest  a solution for above one..
0
 
ozoCommented:
$\=$/;print for grep -d && (-M) < 2, <path/*/*>;
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now