"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The second method is better defensive programming. However, what it does is pretty much equivalent to the following:
Because FILENAME is actually a subroutine, it cannot be interpolated in quotes. In other words, the following are not synonymous: The first example prints the filename, the second just prints "FILENAME". That's a minor issue, but it does crop up from time to time (particularly when I'm writing an open X, Y or die statement).
Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. In reply to (Ovid constants) Re: my $var; vs. use constant VAR = '';
by Ovid
|
|