Concerning > vs >>. Once you open a file, records will be appended to the end of a file whether you use >> or >. The difference between the two only affects what happens to records already in the file. >> will preserve the current file contents and only add new records to the end. If you use >> and run your program a second time, the file "0-999" will have 2000 records in it. Each record from 0-999 will have two copies: the records 0-999 from the first run and then again at the end the same 1000 records repeated a second time. > avoids this problem by clearing out the old contents. It lets you start the file fresh as if it had been created for the very first time.
Concerning die.Yes, there is a chance that the file will not be created. Here are some typical reasons:
Best, beth
In reply to Re^3: split file into smaller chunks
by ELISHEVA
in thread split file into smaller chunks
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |