Link to home
Start Free TrialLog in
Avatar of bb0812
bb0812Flag for United States of America

asked on

Removing forward slashes from a string

I'm working on this script in which I want to remove the contents of a a string where the forward slashes are embetted.  With Adam314's expertise I was able to get the output as follows:
Client         Node             ProcName         Connection Name
------         ----             --------         ---------------
/ELI/TEST/TEST311     elitest31        TEST31FIX1       TEST_ENV1
/ELI/TEST/TEST050     elitest05        TEST05FIX0       TEST_ENV_NUM_0

Now, I want it to appear as follows, in a new file calling it whatever.
Client         Node             ProcName         Connection Name
------         ----             --------         ---------------
TEST311     elitest31        TEST31FIX1       TEST_ENV1
TEST050     elitest05        TEST05FIX0       TEST_ENV_NUM_0



Here's the code that I'm currently working on, but is giving me no results.
 
while (<TMP_OUTPUT>)
{
  s#^.*\/(.*?)$#$1#g;
  print OUTPUT_FILE;
}
close TMP_OUTPUT;
close OUTPUT_FILE;

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Adam314
Adam314

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bb0812

ASKER

Thanks again.