die "You didn't redirect the output" if -t STDOUT; open BIGFILE, "cmd/c type \path\to\bigfile |" or die $!; while( ) { ## do stuff } close BIGFILE; __END__ script bigfile.dat > modified.dat