Not a Perl answer, but the split utility (*NIX) is really handy for this type of thing.
split -b 1M <filename>Will split the file the way you describe, appending "aa","ab", etc. to the resulting files. Now you just have to find the last of these and rename it to the original filename to get your desired behaviour. You should take care though, any file descriptors pointing to the original file will be clobbered, so if these are logfiles you probably need to HUP the logging processes.
In reply to Re: Text File Size
by tirwhan
in thread Text File Size
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |