A program that displays various floating-point scalar values.
#!/usr/local/bin/perl
$value = 34.0;
print ("first value is ", $value, "\n");
$value = 114.6e-01;
print ("second value is ", $value, "\n");
$value = 123.263e+19;
print ("third value is ", $value, "\n");
$value = 123456789000000000000000000000;
print ("fourth value is ", $value, "\n");
$value = 1.23e+999;
print ("fifth value is ", $value, "\n");
$value = 1.23e-999;
print ("sixth value is ", $value, "\n");
Related examples in the same category