Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Removing linefeeds from part of a file

by Abigail (Deacon)
on Jul 12, 2001 at 02:33 UTC ( #95881=note: print w/replies, xml ) Need Help??


in reply to Removing linefeeds from part of a file

{ local $\ = "\n"; while (<>) { chomp; if (/^ENDDESCRIPTION$/) { print "\n"; $\ = "\n"; } print; $\ = "" if /^DESCRIPTION$/; } }

-- Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://95881]
help
Chatterbox?
[virtualsue]: nice photo
[holli]: the fricking beast will only eat dry food
[holli]: nothing else, not even minced meat or fish
[Discipulus]: see you nuns and monks!
[KurtZ]: mice?
[Discipulus]: your cat is dryarian holli
[holli]: not even remotely KurtZ. i did find feathers in the garden a few times though
[holli]: yet no body

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2017-11-21 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (300 votes). Check out past polls.

    Notices?