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

Re: Editing file

by jeroenes (Priest)
on Oct 01, 2001 at 21:43 UTC ( #115921=note: print w/ replies, xml ) Need Help??


in reply to Editing file

With such a description we can give only general advice (also smells a bit like homework), see perlrun, for, split and perlop:

/usr/bin/perl -i.bak @pars= split /\n\n/, join '', <>; for( @pars ){ next if /pattern1/; print $newpara if /pattern2/; print; print "\n\n"; }
Jeroen


Comment on Re: Editing file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-07-29 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls