command-block

Description

XSH command or a block of semicolon-separated commands enclosed within curly brackets.

Example 37. Count paragraphs in each chapter

$i=0;
foreach //chapter {
  $c=count(./para);
  $i=$i+1;
  print "$c paragraphs in chapter no.$i";
}