if open PATCH tmpdir patch text while PATCH text if length text 128 10

1
2
3
4
5
6
7
8
9
if ( open(PATCH,$tmpdir."/".$patch) ){
$text = "";
while(<PATCH>){
$text .= $_;
}
if (length($text) > 128*1024){
$text = "Sorry, cannot display patch, because patch size is bigger than 128K.";
}
.....