in reply to File splitting script

I ran it with a file 1142547634 bytes in size, asked for 1024000 byte pieces, and it worked.

Replies are listed 'Best First'.
Re^2: File splitting script
by Alien (Monk) on Jan 25, 2007 at 18:04 UTC
    I tried to split a 6GB file in 2 files of 3GB each ... and it dies with that error . The script works fine for lesser amounts of size
      Note that though this (probably) is a bug in perl, unless you've got a 64 bit OS, you can't address more than 4GB anyway, so your approach is limited. Also, if the bug was fixed and you have 4GB of memory, you'll push everything else into swap space, slowing your machine down a lot for no reason at all. You really should read() (edit: and write) in multiple, much smaller chunks.