Basic HTML version of Foils prepared March 30 97

Foil 34 Basic Output (Chapter 6 of the Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


We have already seen how to use print to output lists
print @argfiles; # or you can use parentheses
print(@argfiles);
One can as in C obtain format control with printf which starts with a special purpose format statement:
printf("%10s %6d %10.2f\n", $string, $decimal, $float);
  • prints three variables with
    • $string in a 10 character string field,
    • $decimal in a 6 character integer format and
    • $float in a ten character field with two decimal places



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997