First, why reinvent the wheel? logrotate
On to your code:
Assignments such as @ids = $id; are probably not doing what you expect, I suspect you want push instead: push @ids, $id;
For storing the values of the file, you might also want to look into a data structures such as "arrays of arrays" or "arrays of hashes" as described in perldsc.
For a simple way to list the contents of a directory, use glob: @files = glob("$path/*"); (there are several other ways but this one might be enough for your purposes). Also, if you do that, you won't need to concatenate the pathname and filename to get the absolute pathname, as you are currently doing.
To get the size of a file, it is enough to write -s $filename, i.e. in your case $flsize = -s $abspath; (see -X)
Lastly, the style of Perl you are writing in is a little outdated, you should begin your scrips with use warnings; use strict; to force yourself to stick to some less-error prone standards such as pre-declaring your variables.
Just one good resource of many is Modern Perl, available for free online.
In reply to Re: Log rotaion for the files which are existed in the absolute paths from the config files
by Anonymous Monk
in thread Log rotaion for the files which are existed in the absolute paths from the config files
by perladdict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |