I am having a string like this:
$abc= ' NAME=ABCDEF 128 @# CLASS= @# EIGHT 8.58 SCHOOL=GRAMMAR HIGH L-1 '
I am accepting a variable ($input_var) from the user. Based on the variable the user provides I want to delete that line.
Ex: If the input variable provided is NAME, I want to delete: NAME=ABCDEF 128 @#
Ex: If the input variable provided is CLASS, I want to delete: CLASS= @# EIGHT 8.58
I want to write some thing like
$abc =~ s/$input_var(Has to fill some thing here)//;
Early help is highly appreciable.
Thanks in Advance.
In reply to Required help on substitution using a string in perl by amarbvn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |