U have to escape the & character 

so ur substitution shld be 

$_ =~ s/\&/and/g;

Cheers,
Maheedhar Kolla.



On Sat, 2004-02-28 at 09:47, Jeff Zanzinger wrote:
> How can I match the "&" symbol?
> 
> $_ = "test & test";
> s/&/and/; # expect test and test but get test & test
> 
> thanks,
> 
> Jeff 
> 
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.596 / Virus Database: 379 - Release Date: 2/26/2004
>  
> 
> 
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
-- 

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to