in reply to backup script runs out of memory

Depending on your perl's build options, the variable $^M may give you enough memory to die sensibly. See perlvar.

Be well,
rir