Parts Catalog Accessories Catalog How To Articles Tech Forums
Call Pelican Parts at 888-280-7799
Shopping Cart Cart | Project List | Order Status | Help



Go Back   PeachParts Mercedes-Benz Forum > General Discussions > Off-Topic Discussion

 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-08-2005, 05:11 PM
GottaDiesel's Avatar
Banned
 
Join Date: Sep 2003
Location: New Jersey
Posts: 1,564
Perl Programming Question.

Anyone here good with Perl?

Here's the question:

I have a field that is read from a flat file and assigned a $name in some code.

So, let's say the flat file looks like this:

Monkey_Brains|1.00|Brown

Naturally, the first field is "Monkey_Brains"
The second field is "1.00"
The third field is "Brown"

The first field is assigned a variable, we'll call it:

$name

Now here's what I would like to do. All the fields in the $name spot have an underscore '_' between each word. I would like code that could read this field and strip the underscore out. So "Monkey_Brains" would be come "Monkey Brains"

In essence:

$name would equal "Monkey_Brains"

Then some code that reads and modifies $name

$modifiedname would now equal "Monkey Brains"

Many Thanks,

Pete
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2024 Pelican Parts, LLC - Posts may be archived for display on the Peach Parts or Pelican Parts Website -    DMCA Registered Agent Contact Page