in reply to Print on closed filehandle

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: Print on closed filehandle
by PerlingTheUK (Hermit) on Jul 15, 2004 at 13:23 UTC
    nope, the dot concatenates the filename and the string to the ">" which means open for writing.
Re^2: Print on closed filehandle
by onen5 (Initiate) on Jul 15, 2004 at 14:57 UTC
    When in doubt you can check to see if OUT is "defined". ;)
Re^2: Print on closed filehandle
by revdiablo (Prior) on Jul 15, 2004 at 18:56 UTC

    He's using the two-arg form of open. You're thinking of the three-arg form, which is usually a better idea.

      I must admit, aside from making an ass of myself :), I've never seen open with a dot concatting the elements... either the 3 arg form or the standard open(OUT,"<$something")..

      I will now log off, shut down all the computers, and read many books. See you after the elections sometime.
        I've never seen open with a dot concatting the elements

        That's probably because it's a slightly silly thing to do. Especially when the < is already enclosed in double quotes. Quotes do interpolation, so there's no reason for an explicit concatenation.