in reply to How to tell if script sucks...memory

how can you tell if your program is a memory hog, or is forking processes unbeknownst?

You can fork processes using fork, system, or open. If you're running code you wrote, I'd expect you to know whether you'd forked anything off, so I'm guessing you're asking about detecting this in code you did not write.

ps axl will show memory information (in VSZ and RSS fields). It also lists every process's parent process ID (in PPID), so for a given Perl program, you can see how much memory it's using, and you can look for other processes spawned from it.

Will using the '-w' directive prevent it?

No, that just warns about possible coding mistakes.