in reply to Re: Can't get text to print
in thread Can't get text to print

I hope, If the mode is missing by default the file takes the default mode that is "<" (read only) mode.


All is well

Replies are listed 'Best First'.
Re^3: Can't get text to print
by marto (Cardinal) on Oct 20, 2014 at 10:53 UTC

    from the linked documentation:

    "If MODE is < or nothing, the file is opened for input."

Re^3: Can't get text to print
by ww (Archbishop) on Oct 20, 2014 at 14:02 UTC

    Update: Intended as response to pre-update version of Re: Can't get text to print and misplaced. Mea culpa. </update>

    From http://perldoc.perl.org/functions/open.html (5.20)

    If three (or more) arguments are specified, the open mode (including optional encoding) in the second argument are distinct from the filename in the third. If MODE is < or nothing, the file is opened for input.

    i.e., opened for reading. And also:

    In the one- and two-argument forms of the call (emphasis supplied) ... (y)ou can--but shouldn't--omit the mode in these forms when that mode is < .


    check Ln42!