[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] perl line pls



gcingo@accesscom.com,Internet writes:
>
>would anyone be kind enough to tell me what is wrong with this line...
>
><blockquote> 
>print  "$hi{$input{'language'}}, $input{'name'} .
>$how{$input{'language'}}?\n";
></blockquote>
>
>it just won't compile no matter how I cut it :-(
>
I think that there may be either a Perl interpreter or a web browser
somewhere that's just as baffled as I am. I took the liberty or rewriting
it into some code that has the values you're using,

$input{'name'}     = "Josh";
$input{'language'} = "canadian";
$hi{'canadian'}    = "Hey";
$how{'canadian'}   = "How's it goin', eh";
print  "$hi{$input{'language'}}, $input{'name'}.
$how{$input{'language'}}?\n";

And the result is,
Hey, Josh.
How's it goin', eh?

So the code itself works just fine. The trouble is, I would guess, the
<blockquote>s. Either they have no place in a perl script or the perl
script has no place in the HTML code. If you want to include HTML in the
output, try,

print  "<blockquote>\n$hi{$input{'language'}}, $input{'name'}. 
$how{$input{'language'}}?\n</blockquote>";

-josh


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch