Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: binmode and one-liners

by BrowserUk (Patriarch)
on Jun 30, 2007 at 09:35 UTC ( [id://624183]=note: print w/replies, xml ) Need Help??


in reply to Re: binmode and one-liners
in thread binmode and one-liners

The problem is, as identified by bart, that binmode affects the open file associate with a filehandle. Besides that a BEGIN block will happen before the file is opened, the diamond operator can also open multiple files, each of which would need to be binmoded.

I keep thinking about some sort of tieing of *ARGV in a BEGIN block?

If that could be made to work and stuck in some suitably short named module, the you could do something like:

perl -margvb -ne" ... * files

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-25 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found