Paul Harwood said:

> I am reading through a book on Objects and References and I don't
> understand this statement:
>
> $sum +=  $_ for split //;
>
> I thought a FOR statement needed to be in braces. How is it being used
> in this context?

It means exactly the same as:

  for (split //)
  {
      $sum +=  $_;
  }

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


-- 
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