develooper Front page | perl.perl5.porters | Postings from June 2011

For else blocks?

Thread Next
From:
Alberto Simões
Date:
June 25, 2011 08:23
Subject:
For else blocks?
Message ID:
4E05FD4E.8030404@alfarrabio.di.uminho.pt
Hello

First sorry if this was already discussed. Tried to search on the 
archives but didn't find any relevant result.

If this was already discussed, just say so and forget my email :)


Was reading Kolon syntax manual for Text::Xslate and found the else 
block for for blocks interesting:

   for my $val (@array) {
      # do something
   }
   else {
      # say we do not have any values to process
   }

Would this be useful?
Not sure about implementation details, though...

cheers,
ambs

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About