On Wed, 6 Mar 2002, Fred Sahakian wrote:
> Im taking in data through a Perl Script with the following conversion:
> 
> $value = ~s/Apple/Orange/g;
> 
> This is fine for new data, but each time the program is run it's
> taking all the data being entered and turning the apples into oranges,
> any ideas how I get the program to ignore the original data?  Ive
> tried a variety of logic but have had no luck.

($new = $old) =~ s/apple/orange/;

....will leave the original value alone and place the modified value in a 
separate variable.

-- 
Eric P.
Los Gatos, CA


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to