bb0812
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
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;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER