Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Re^3: inserting HTML file in a PERL script

by wfsp (Abbot)
on May 29, 2005 at 11:43 UTC ( [id://461494] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my $name = 'John';
    my $html = get_html(); # sub name corrected
    return $html;
  2. or download this
    <p>Hi there <!-- name --></p>
  3. or download this
    my $html = get_html();
    $html =~ s/<!-- name -->/$name/;
  4. or download this
    my $html;
      close $fh
        or die "cannot close $file: $!";