Set ip address as 10.30.20.1
write a script to replace the 30 with 40 ?

Answer Posted / satyanarayana

here you can do this in multiple ways

1.regsub 30 $data 40 a
puts $a

this will give you the replaced string

2.string replace $data 3 4 40

this also will give you the replaced value

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi all, Is there any certification exams available for TCL and Perl. If so please let me know, my mailid is vpbharathi@gmail.com. Thanks in advance, Bharathi.P

2528