question: you pointed out earlier.
why is my filehandle closing on this.
I foreach, get cf, then try to read it. But, it says:
ERRROR No such file or directory at ./B.p line 10, <CF> chunk 49.
thanks
1 #!/usr/bin/perl -w
2 use strict;
3 my $agent = "best1agent_start";
4 my $collect = '/usr/bin/su - patrol /usr/adm/best1_default/bgs
+/scripts/best1collect -q>>$LOG 2>>$LOG';
5 open CF_FILES, "cf.files" or die "Error: $!";
6 my @cf_files=<CF_FILES>;
7 #close CF_FILES;
8 foreach my $cf(@cf_files){
9 my $line;
10 open (CF, "$cf") or die "ERRROR $!";
11 while ($line = <CF>){
12 if($line =~ /$agent/){
13 print $line;
14 # $line = "$collect";
15 # print $line;
16 }
17 }
18 }
| [reply] [d/l] |