perl -i -pe 's/\.mbh_succ_roam_i_vlr_e_plmn/\.new_mbh_succ_roam_i_vlr_ +e_plmn/g' <input_file>
when I run the perl oneliner with the input file all 3 lines are getting changed. what is the change should I need to make to change only first line. In other words how can I change the code to affect only if the word matches neglecting the rest of lines.file content, __DATA__ .mbh_succ_roam_i_vlr_e_plmn next .mbh_succ_roam_i_vlr_e_plmn1 first .mbh_succ_roam_i_vlr_e_plmn2 verify
In reply to regex change should be applied in iputfile by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |