You're not showing us your full code. You don't even show where you're reading the input. So don't expect many especially useful answers.
At a guess, you're slurping the entire file into memory, when perhaps you'd be better off processing it line by line.
That said, 30 MB is not a large file by modern standards, and should fit in memory quite easily.
In reply to Re: warning "Out of memory!"
by tobyink
in thread warning "Out of memory!"
by rocketperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |