1.直接读取 open (FILEHAND,"/root/tt.txt") || die ("can't open file"); $profile=<FILEHAND>; close FILEHAND; print $profile;