Re: interpolating the strings

2004-09-16 Thread Wiggins d Anconia
> On Sep 16, KYu said: > > >I was confront with a such question: how to define the strings, which > >should be interpolated every time when it met? > > > >For example, this code > > > >$var1 = "one"; > >$str = "number $var1, "; > >print $str; > > > >$var1 = "two"; > >print $str; > > > >produce "n

Re: interpolating the strings

2004-09-16 Thread Jeff 'japhy' Pinyan
On Sep 16, KYu said: >I was confront with a such question: how to define the strings, which >should be interpolated every time when it met? > >For example, this code > >$var1 = "one"; >$str = "number $var1, "; >print $str; > >$var1 = "two"; >print $str; > >produce "number one, number one" to the

Re: interpolating the strings

2004-09-16 Thread JupiterHost.Net
KYu wrote: Hello, I was confront with a such question: how to define the strings, which should be interpolated every time when it met? For example, this code always use strict; use warnings; $var1 = "one"; $str = "number $var1, "; print $str; $var1 = "two"; print $str; You never changed the value

Re: interpolating the strings

2004-09-16 Thread KYu
Hello. Thanks for your answer! > In general you have to continually modify $str, for instance, Yes, I know about such method, but redefining a systring - isn't good way. > Obviously you could set your constant value into a separate variable so > that you could change them all quickly if you want.

Re: interpolating the strings

2004-09-16 Thread Wiggins d Anconia
> Hello, > I was confront with a such question: how to define the strings, which > should be interpolated every time when it met? > > For example, this code > > $var1 = "one"; > $str = "number $var1, "; Right here Perl interpolates $var1 and stores the complete value into $str, which is set. E