in reply to Re: This is weird...
in thread This is weird...

to add on to that thorough explanation provided by chromatic, it's normally recommended you use uppercase filehandles. in this case 'test' should probably be 'TEST'. without the quote-dealies, of course. just to eliminate all ambiguity, the code would look like this:
open(TEST, ">test.html") or die "Cannot open test.html for writing: $! +\n"; flock TEST, 2; print TEST "Whatever you want to say"; close(TEST);

Replies are listed 'Best First'.
RE: RE: Re: This is weird...
by visnu (Sexton) on Jun 17, 2000 at 12:56 UTC
    ... and that's so that there's less of a chance that the filehandle name won't conflict with others running around in your namespace.