Re: [Perl-unix-users] Insert Problem

2002-01-24 Thread fc_yoong
[EMAIL PROTECTED] eState.com Subject: Re: [Perl-unix-users

Re: [Perl-unix-users] Insert Problem

2002-01-24 Thread Kuhnibert
> Need help! > > I would like to insert a \ before a $ (if found) in the following string: > > $x = '123456$1$2$3'; > > Output of $x must be 12345\$1\$2\$3. > > How do I this? > ($x = '123456$1$2$3') =~ s/\$/\\\$/g; print $x; --till ___ Perl

Re: [Perl-unix-users] Insert Problem

2002-01-24 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > Need help! > > I would like to insert a \ before a $ (if found) in the following string: > > $x = '123456$1$2$3'; > > Output of $x must be 12345\$1\$2\$3. > > How do I this? Untested: $x =~ s/\$/\\\$/g; # last \ may be unnecessary -- ,-/- __ _

[Perl-unix-users] Insert Problem

2002-01-24 Thread fc_yoong
Need help! I would like to insert a \ before a $ (if found) in the following string: $x = '123456$1$2$3'; Output of $x must be 12345\$1\$2\$3. How do I this? Many thanks. ___ Perl-Unix-Users mailing list. To unsubscribe go to http://listserv.