Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: (nrd) Adding periord to the end of line

by newrisedesigns (Curate)
on Nov 20, 2002 at 17:32 UTC ( [id://214538]=note: print w/replies, xml ) Need Help??


in reply to Adding periord to the end of line

# replace $myline with your variable or $_ if($myline !~ /\.$/){ $myline .= ".\n"; }

Why do you put the newline back on? Are you sure you want to do that, considering you don't put it back on for the lines without a period?

If this helps, sign up! Perl Monks welcomes new monks. Post a reply if you need more help.

John J Reiser
newrisedesigns.com

Replies are listed 'Best First'.
Re: Re: (nrd) Adding periord to the end of line
by Anonymous Monk on Nov 20, 2002 at 18:41 UTC
    Thanks, John. It works smoothly. Amazingly simple. Actually, I use similar match, but different print. I know what I did wrong before: I use this instead- print $_, ".\n"; (after the match) And it only works for the first instance! Will join this group now.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found