$strASub = ''; open(ASUBFILE,"/A/sub/$strTName") or die "can't open the asub file: $strTName : $!\n"; while(){ $strASub .= $_; } close(ASUBFILE) or die "can't close the asub file: $strTName :$!\n";