in reply to how to delete part of the line?
here is what I am doing:
my result.txt file has final output and it looks like below:blah1.blah1.blah1=10 blah2.blah2.blah2=0 bhal3.blah3.blah3=false
here is my code after I get the result.txt file:
my $value = "value.txt" ;#final file I want with output as 10/0/false open RESULT, "<$result"; open VALUE, ">$value"; s/line\d+=(.*)// and print "$1/" while (<RESULT>); close VALUE; close RESULT;
am I doing anything wrong?
Please help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to delete part of the line?
by ww (Archbishop) on May 23, 2009 at 02:19 UTC | |
|
Re^2: how to delete part of the line?
by targetsmart (Curate) on May 22, 2009 at 05:54 UTC | |
|
Re^2: how to delete part of the line?
by walkingthecow (Friar) on May 22, 2009 at 07:03 UTC | |
|
Re^2: how to delete part of the line?
by linuxer (Curate) on May 22, 2009 at 08:20 UTC |