#!/usr/pkg/bin/wsbasic

dir=run("ls -al")
  
###################################
#foreach met default seperator = \n
#
i=0
foreach line in dir
begin
  i=i+1
  print i,".\t", line
end


print "\n\nnow seperate on '.b'"

#################################
#foreach with different seperator
#
i=0
foreach line in dir seperated by ".b\n"
begin
  i=i+1
  print i,".\t", line
end
