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

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://95881]
[shmem]: stevieb: thanks! new thing learned, done for today ;-)
[stevieb]: hahaha! Some days I wish I could quit after learning one new thing. Often that happens before I'm one my first coffee ;)
[MidLifeXis]: OHHHH. Mea culpa - I read that as coderef (facepalm)
[stevieb]: mlx: That's easy to have done in that context. For those who don't know, it converts itself into the current sub name, much like __PACKAGE__ translates into the current package name (or class)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2017-05-24 17:32 GMT
Find Nodes?
    Voting Booth?