Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re:{2} Printing to a specific place in a file

by jeroenes (Priest)
on Oct 04, 2001 at 19:36 UTC ( #116736=note: print w/replies, xml ) Need Help??

in reply to Re: Printing to a specific place in a file
in thread Printing to a specific place in a file

You can make it even simpler:
#!/usr/bin/perl -i.bak -wp c:/test.txt print "newline\n" if m/somecond/; s/this/that/;

IMHO command line switches are a Good Thing (tm).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://116736]
[Tux]: None work for me. My dead key is AltGr (right Alt)
[Tux]: And I just tested, neither do other Tk apps :) (95% of my Tk Apps is either just monitoring (no input) or input of just numbers). Something to investigate then
[choroba]: Maybe something like this?
[choroba]: I vaguely remember we had problems with dead keys in Tk at $work - 2, but I forgot all the details

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2017-09-25 20:42 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (290 votes). Check out past polls.