×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Need a little help on Perl

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" => ""
  );

RE: Need a little help on Perl

I'm not sure I understand the question, but I'll take a stab at it.....

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close