notoriousrab430 has asked for the wisdom of the Perl Monks concerning the following question:
$ ./perlAnalyzeDailyStats.pl syntax error at ./perlAnalyzeDailyStats.pl line 29, near "@array(" Execution of ./perlAnalyzeDailyStats.pl aborted due to compilation err +ors.
1 #!/usr/bin/perl 2 3 @files = `ls -1trh s3_dailystats.*`; 4 foreach (@files) 5 { 6 $filename = $_; 7 #print $filename; 8 open(FH,"<$filename"); 9 while(<FH>) 10 { 11 $line = $_; 12 if($line =~ /([0-9]{17,18})/) 13 { 14 print "$1\n"; 15 push(@array,$1); 16 last; 17 } 18 } 19 } 20 $arrayCount = @array; 21 print "array count is $arrayCount"; 22 foreach(@array) 23 { 24 if ($counter eq $arrayCount) 25 { 26 last; 27 } 28 $counter++; 29 print "difference is " . @array($counter) - @array($counte +r - 1); 30 } 31
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simplish script (I think)
by LanX (Saint) on Sep 25, 2020 at 00:30 UTC | |
|
Re: simplish script (I think)
by NetWallah (Canon) on Sep 25, 2020 at 00:33 UTC | |
by jeffenstein (Hermit) on Sep 25, 2020 at 08:10 UTC | |
by NetWallah (Canon) on Sep 25, 2020 at 15:04 UTC | |
|
Re: simplish script (I think)
by jdporter (Paladin) on Sep 25, 2020 at 20:11 UTC | |
|
Re: simplish script (I think)
by notoriousrab430 (Novice) on Sep 25, 2020 at 21:25 UTC |