Basic HTML version of Foils prepared Sept 20 97

Foil 35 Basic Output

From Tutorial on PERL Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


1 We have already seen how to use print to output lists:
2 print @argfiles; # or you can use parentheses
3 print (@argfiles);
4 As in C, one can obtain format control with printf, which starts with a special purpose format specifier:
5 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

in Table To:


© 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 Sun Sep 21 1997