programming-examples/perl/Datatype/Direct Scalar References.pl

16 lines
364 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$title = "Reference Color";
$bodyColor = "FF0000";
$HTMLHead = "<html> <head> <title> $title </title> </head>";
$HTMLBodyColor="<body bgcolor=$bodyColor>";
$headReference = \$HTMLHead;
$bodyReference = \$HTMLBodyColor;
open (OUTFILE, ">refColor.html");
print OUTFILE <<eof;
$$headReference
$$bodyReference
<test>
</body>
</html>
eof
close(OUTFILE);