replace some characters in the lines
sorry
|
Quote:
The language is called Perl. Now, based on what Perl documentation did you write Code:
line1 ='"$line" | grep "disable = yes"'; I suggest to first read perldoc perlop perldoc perlfunc perldoc perlretut . You can also find Perl documentation online: http://perldoc.perl.org/ . You are trying to write Perl code not understanding very basic things about Perl, like regular expressions, for example. You do no need to call 'sed' or 'grep' from Perl programs. |
Code:
sed 's/disable[ \t]*=[ \t]*yes/disable = no/' file |
hmmmm ... does "sorry" mean this question, of which there is no longer one, is over?
|
grail:
"sorry" mean "I am ashamed for the low mistake" when the programming run: line1 ='"$line" | grep "disable = yes"'; the error message: cann't modify constant item in scalar assignment..near '"$line" | grep "disable = yes"'; can you tell me why? |
Quote:
I can tell you I have asked some great ones when my brain has been switched off ;) As for your issue, Sergei is one of the Perl gurus so I would follow his advice :) |
All times are GMT -5. The time now is 10:41 PM. |