Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Can't get text to print

by vinoth.ree (Monsignor)
on Oct 20, 2014 at 10:50 UTC ( [id://1104411]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1104411]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found