Hello List, #!/usr/bin/perl
close(STDERR); open(STDERR,">/tmp/test.log") or die " Can't do it!!"; for($i=0; $i <=30; $i++) { print STDERR "print something in the file.\n"; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat(STDERR); if ( $size eq '500' ) { exit(0); } } I want this file not to grow more than 50KB. How can I go about it. I been stuck here.. this above script will not do the needful Thanks in advance, Cheers, Umesh