#!perl -w open READ, 'f:\mpegav\avseq01.dat'; binmode (READ); open WRITE, ">c:\CD\scream3.dat"; binmode (WRITE); # If the file read fails, the script won't die, the eval # just fails, and I can close the file. :) eval { while () { print WRITE $_; print tell (READ) ," bytes\n"; # just to see some action on the screen. } }; close (WRITE); close (READ);