go ahead... be a heretic | |
PerlMonks |
Re: Is this code correctby talexb (Chancellor) |
on Jan 28, 2009 at 17:37 UTC ( [id://739654]=note: print w/replies, xml ) | Need Help?? |
After I run your code through perltidy, I get the following:
There are some problems with your code. First of all, I consider it bad form to access elements of @_; it's more natural for your prologue to be my ( $nick, $reply ) = @_. As has already been pointed out, the lines with just @info; are meaningless. What are you trying to do there? There's no need to put $n inside quotes. That line can just be writ1($n);, and I would probably just do foreach (@info) { writ1($_); }. Finally, we have no idea whether the code works (that is, whether it's correct) because we have no idea what it's trying to accomplish -- there are no comments, nor have you provided anything to guide us as to what the inputs are (nickname and reply, but what's the context?). There's also no clue as to what the admin, writ1 or pm routines do.
In Section
Seekers of Perl Wisdom
|
|