Need a little help on Perl
Need a little help on Perl
(OP)
Hello,
Please can someone tell me what to do exactly here with these instructions:
«You can either write an encoding function that would replace blank space
with some invisible character such as \s using regular expression and
replace it back before output or use a if then statement to replace the
system variable with output that is 2 words.»
My problem: example: "Services Financiers" appear as "Services_Financiers"
on the web but I want to have a blankspace. Thank you for helping me
))
Script behind:
# List Categories in your links script
@Categorie =
"Associés\/Franchises\/Occasions d'affaire",
"Capital Risque & Financement",
"Cours\/Formation",
"Divers",
"Services Financiers",
"Services Professionnels"
);
# Define Categorie description
%Categorie_desc =
"Associés\/Franchises\/Occasions d'affaire" => "",
"Capital Risque & Financement" => "",
"Cours\/Formation" => "",
"Divers" => "",
"Services Financiers" => "",
"Services Professionnels" => ""
);
Please can someone tell me what to do exactly here with these instructions:
«You can either write an encoding function that would replace blank space
with some invisible character such as \s using regular expression and
replace it back before output or use a if then statement to replace the
system variable with output that is 2 words.»
My problem: example: "Services Financiers" appear as "Services_Financiers"
on the web but I want to have a blankspace. Thank you for helping me

Script behind:
# List Categories in your links script
@Categorie =
"Associés\/Franchises\/Occasions d'affaire",
"Capital Risque & Financement",
"Cours\/Formation",
"Divers",
"Services Financiers",
"Services Professionnels"
);
# Define Categorie description
%Categorie_desc =
"Associés\/Franchises\/Occasions d'affaire" => "",
"Capital Risque & Financement" => "",
"Cours\/Formation" => "",
"Divers" => "",
"Services Financiers" => "",
"Services Professionnels" => ""
);
RE: Need a little help on Perl
You can replace a string or group of characters inside another string using.....
$string =~ s/$what_to_replace/$replace_it_with/;
So, with your string in a variable, $string,
$string =~ s/_/ /; # replace an underline with a space
'hope this helps...
keep the rudder amid ship and beware the odd typo