in reply to Re^2: Getting Filenames that contains a particular string recursively From a Directory
in thread Getting Filenames that contains a particular string recursively From a Directory

Hi !!

Thanks for your valuable code !!

I tried your first code.. the output is like this..

/home/modules/one.pm /home/modules/two.pm /home/modules/three.pm
I dono how to get only those filenames.. <br> i.e like one, two and three in an "array"<br>

Thank u

  • Comment on Re^3: Getting Filenames that contains a particular string recursively From a Directory
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: Getting Filenames that contains a particular string recursively From a Directory
by blazar (Canon) on Dec 06, 2005 at 14:48 UTC

    I'm not sure if I understand what you mean. Do you want to gather those filenames into an array, say @results? Well, if so then you just have to substitute a print with a

    (push @results, $_)