> 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 | / * . etc. We
have to use / / for pattern matching.

foreach (@dna)
{
  if (/$base2/)  # It will check like m/$base2/ $_;
  {
   ..
  }

}

hth.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to