laziness, impatience, and hubris | |
PerlMonks |
Re: Personal crypting algorithmby premchai21 (Curate) |
on Nov 05, 2001 at 22:39 UTC ( [id://123381]=note: print w/replies, xml ) | Need Help?? |
Don't print the results. Returning them instead is a much better idea. What if the caller doesn't want the encrypted / decrypted string printed, but instead wants to do something else with it? Sure, they could do something obfuscated like tie STDOUT so its output goes into a variable, but the idea here (assuming this is not for obfuscation) is to not require the caller to do things like that.
In Section
Code Catacombs
|
|