MuthuKumar wrote:
Hello All,

    I have a directory which contains several files.. like .txt .html .js
files like that.
I have to search a pattern in all files.. if it is available then replace it
and else leave it out.

I have made it for single file.. what i want is to implement for the full
directory..

my @file_list = </*.txt/>
foreach $file (@file_list){
file loop
<snip>.
close(file-handle);
}

I have checked like this.. i did not get any response at all..
No files are stored in the array too. what is wrong with this.. and how to
accomplish this.


-- Regards, Muthukumar.






You need to change the line: my @file_list = </*.txt/> to my @file_list = <*.txt> or my @file_list = glob "*.txt"

--
Flemming Greve Skovengaard           FAITH, n.
a.k.a Greven, TuxPower                   Belief without evidence in what is told
<[EMAIL PROTECTED]>              by one who speaks without knowledge,
4168.08 BogoMIPS                         of things without parallel.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to