Re: use of backslash..

2005-08-11 Thread Muthukumar
> if (\$base2\) > > is used>> the backslashes are used for what? for instance than why not we > use the same for an array variable: > > foreach (@dna) > > Does it have to do with if(0) or if (1) rather than literally taking the > value .. \ is used to speicific meaning to few characters like |

Re: use of backslash..

2005-08-10 Thread Jeff 'japhy' Pinyan
On Aug 10, Vineet Pande said: I faced an example where in a loop: if (\$base2\) You probably say if (/$base2/) { ... } The /.../ is a pattern match. It's shorthand for if ($_ =~ /$base2/) { ... } which treats $base2 like a regular expression (pattern) and tries to find a substring i

use of backslash..

2005-08-10 Thread Vineet Pande
Hello, I faced an example where in a loop: if (\$base2\) is used>> the backslashes are used for what? for instance than why not we use the same for an array variable: foreach (@dna) Does it have to do with if(0) or if (1) rather than literally taking the value .. thanks in advance cheers,