Just another Perl shrine | |
PerlMonks |
Re: print_notice or print $notice or print notice?by greywolf (Priest) |
on Oct 14, 2001 at 21:33 UTC ( [id://118763]=note: print w/replies, xml ) | Need Help?? |
I prefer approach 1 for the following reasons.
a) It's easy to read. b) It allows you to change the value $notice on a whim. I've never really thought of using approach 2 or 3 before. It would seem that they are not re-usable. I suppose approach 2 could print a variable passed in as a parameter rather than a string. That would make it re-usable but it would be very cumbersome to call it. mr greywolf
In Section
Meditations
|
|