in reply to Re^2: can't modify anonymous hash ({}) in scalar assignment
in thread can't modify anonymous hash ({}) in scalar assignment

For small projects self-documenting code usually works well enough. Choose good variable names and append descriptors like "_aref" for array references, "_href" for hash references, etc. If you are passing a lot of variables in or you feel like you need to heavily document what is being passed in then you could probably do with so some code code refactoring. An obvious one is if you are passing in a lot of variables then think about putting them into a hash and then just passing in a reference to the hash instead (this also makes it easier to add new variables/hash entries as your code evolves). If you want some additional documentation then put in some POD above the subroutine explaining what is does, what it takes/expects, returns, etc. You might also want to check out Perl Best Practices.
 

Elda Taluta; Sarks Sark; Ark Arks

  • Comment on Re^3: can't modify anonymous hash ({}) in scalar assignment