in reply to a perl code syntax help
G'day ghosh123,
"In the above code, what does this <<END and END mean ?"
The construct
<<END; ... END
is called a heredoc.
Simplistically, it's just a string. In perlop, it's introduced in "Quote and Quote-like Operators" with a lot more detail in "Quote-Like Operators".
"how can I change the code which is in between that <<END and END, to insert a if-else condition for that popup_menu."
Now that you know that's a string, you probably won't be trying to do that any more. :-)
I'd suggest something along these lines:
my $popup_string; if (some_condition()) { $popup_string = ...; } else { $popup_string = ...; } $html .= <<END; ... <td bgcolor="#EEEEEE">$popup_string</td> ... END
-- Ken
|
|---|