Re: Adding a line in a file inside many directories



Gunnar Hjalmarsson wrote:
Ved wrote:

foreach my $file_list (@rgstr) {
print $file_list ; #printing list of dir

open (dirIN, '$file_list/kat.s') or die "Cannot open 'File.txt' $!";
#This is not working

open (dirIN, "$file_list/kat.s") or ...

In addition to the double-quotes, you first need to:

chomp $file_list;

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.