in reply to Re: HTML embedded in perl
in thread HTML embedded in perl

Excuse me, but this won't work. $data and $some_content won't get interpolated. You have to use << "HTML" instead.

update: forget this, look at the replies to this node, they're right. And the ancestor node is right too. The only node not being right is this one. :-}

Bye
 PetaMem

Replies are listed 'Best First'.
Re: Re: Re: HTML embedded in perl
by flyfishin (Monk) on Dec 18, 2002 at 16:43 UTC
    Sorry, but you are incorrect. qq IS what you use to double quote text and have variables interpolated. q will single quote and not interpolate.

    #!/usr/bin/perl -w

    use strict;
    my $text = "INSERTED TEXT";
    print qq! There is tome $text here \n!; # THIS INTERPOLATES
    print q! There is some $text here \n!; # THIS DOESN'T
Re: Re: Re: HTML embedded in perl
by tachyon (Chancellor) on Dec 19, 2002 at 08:13 UTC

    Actually interpolated context is the default. You don't need the rabbit ears.

    $why_dont_you_check_your_facts_before_you_embarass_yourself = 'Oops!'; print <<THIS; I would have to say: $why_dont_you_check_your_facts_before_you_embarass_yourself THIS

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print