in reply to a method to get words from a file into an array
I think what you have is basically fine.
You might not want to die() in your module. Better to carp() and return undef.
You might also want to have a more robust split pattern. Maybe /,\s*/ for instance.
The benefit of using return is that you make your code more readable. Making the return explicit will help the newbie they hire (for half your wages after they lay you off) maintain your code. I skip return in one-liners and quickie throw-aways but I use it otherwise.
-sauoq "My two cents aren't worth a dime.";
|
|---|