perlでファイルを読むとき

ちょっとハマった。


while(<$fh>){
print;
}


はいいけど、


while(<$fh>){
print $out;
}


はだめ。


while(<$fh>){
print $out $_;
}


としないと。