open( LOG, "") or die "cannot open the log: $!"; while( ) { ... #### while( <>) # reads from STDIN { ...