Substitution tag only outputting first word

57 Views Asked by At

I have the following perl mason code:

% my $var = "San Diego";
<input type="text" value=<% $var %> disabled />

However, when I do this, the value of the textfield only gets set to the first word. So in this case, it gets set to "San". How can I fix this?

1

There are 1 best solutions below

1
On BEST ANSWER

Try to enclose the value between double quotes

<input type="text" value="<% $concertCity %>" disabled />