For some reason, there is a newline feed not being cleaned out from a variable I have. The code i am using is;
my $new_cat = $_;
chomp $new_cat;
$new_cat =~ s/_/ /g;
$new_cat =~ s,\n,,g;
...if I put an extra bit of Regex in that cleans out \W, then it doesn't show the newline. The problem with that, is it cleans out stuff I don't want removing, such as / and \.
Anyone got any ideas why it would do this?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
my $new_cat = $_;
chomp $new_cat;
$new_cat =~ s/_/ /g;
$new_cat =~ s,\n,,g;
...if I put an extra bit of Regex in that cleans out \W, then it doesn't show the newline. The problem with that, is it cleans out stuff I don't want removing, such as / and \.
Anyone got any ideas why it would do this?

Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!