
speedman
New User
Jun 17, 2008, 12:21 AM
Post #1 of 2
(3512 views)
|
Replaces a piece of text!
|
Can't Post
|
|
Hi all, I'm a new perl user and I'm studing the basis of language. I saw various constructs to replace a string as : s// or m//. But I'm tryng to replace a piece of text. For example : I've To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep; To sleep: perchance to dream: ay, there's the rub; For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause: there's the respect That makes calamity of so long life; and I want To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; To sleep: perchance to dream: ay, there's the rub; For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause: there's the respect That makes calamity of so long life; eliminating the bol phrase. I think at a for and next loop, but I don't known to do it. Can you help me ? Thank you in advance and sorry for my poor english! speedman!
|