#!/usr/bin/env perl use strict; use warnings; print '-' x 40, "\n"; # (part of) Current code in sub endingA {...} print "\n\nYou prepare the escape pods for launch. One for yourself\n and one for Doctor Willis. You quickly run back to the utility room\nand carry him into the command room. You lay him down\nin one of the escape pods, ...\n"; print '-' x 40, "\n"; print '-' x 40, "\n"; # Easier to read code for sub endingA {...} print <<'EOT'; You prepare the escape pods for launch. One for yourselfand one for Doctor Willis. You quickly run back to the utility roomand carry him into the command room. You lay him down in one of the escape pods, ... EOT print '-' x 40, "\n"; # Predefined text for use in sub endingA {...} my $endingA_text = <<'EOT'; You prepare the escape pods for launch. One for yourself and one for Doctor Willis. You quickly run back to the utility room and carry him into the command room. You lay him down in one of the escape pods, ... EOT print '-' x 40, "\n"; print $endingA_text; print '-' x 40, "\n";