SPUG: Removing newlines from a multi-line string
Joshua Lanza
joshlanza at hotmail.com
Wed Mar 14 02:01:09 CST 2001
Hi all,
I have a script that gets a chunk of HTML from an access database and plunks
it into a template. The problem is that it puts newline characters in the
HTML at the end of every line in the HTML blob, which is (1) unseemly and
(2) making it difficult to manipulate the text after the pages are
generated.
I store the text in $html and then try
$html =~ s/\n//ig;
but nothing seems to happen. If this worked it would solve (2) from above
but wouldn't help (1). I guess what I'm really looking for is why I'm
getting the extra newlines in the first place. Any thoughts greatly
appreciated,
Josh
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list