--- Michael Fowler <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 04, 2001 at 11:40:46PM -0500, [EMAIL PROTECTED]
> wrote:
> > open(FILE, "$filename");
>
> Always check your open calls. For example:
> open(FILE, $filename) || die("Unable to open file \"$filename\":
> \l$!.\n");
If you use "or" instead of "||" you can reduce the "line noise" by
taking out the parens.
open(FILE, $filename)
|| die("Unable to open file \"$filename\": \l$!.\n");
becomes
open FILE, $filename
or die "Unable to open file \"$filename\": \l$!.\n";
> You should move your open(NEWFILE, ...) call outside of the while
> loop, and thus reduce the number of open calls made.
*Absolutely.*
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/