in reply to anonymous filehandes?
Well the first is readable and the second one is too much magic for my tastes. The second requires a level of Perl knowledge you can't always assume in your fellow programmer.
Also, the first option gives you the chance to test your call to open for any failures ( permissions, file doesn't exist, etc ) and handle them.
In short the first version is more correct, the second should be relegated to perl one liners...
Frank Wiles <frank@revsys.com>
www.revsys.com
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: anonymous filehandes?
by Anonymous Monk on Jul 09, 2007 at 16:10 UTC | |
by grinder (Bishop) on Jul 09, 2007 at 17:21 UTC |