according to the Mojolicious web framework docs you will need to add, and extra = at <% = for printing in raw format.
<%= $selected %>
will be
<%== $selected %>
for more help you can read this http://github.com/kraih/mojo/blob/master/lib/Mojolicious/Guides/Rendering.pod
try like this:
<select name="alignment" class="select"
<%== param('feature') ? '' : 'disabled'; %>
>
% foreach (keys %al) {
% my $selected = param('aligment') && param('aligment') eq $_ ? ' selected' : '';
%
% if (!param('aligment') && $_ eq 'left') { $selected = ' selected' }
%
<option value="<%=$_%>"
<%= $selected %>
>
<%= $al{$_} %>
</option>
%
% }
</select>
or
<select name="alignment" class="select"
<%== param('feature') ? '' : 'disabled'; %>
>
% foreach (keys %al) {
% my $selected = param('aligment') && param('aligment') eq $_ ? ' selected="selected"' : '';
%
% if (!param('aligment') && $_ eq 'left') { $selected = ' selected="selected"' }
%
<option value="<%=$_%>"
<%== $selected %>
>
<%= $al{$_} %>
</option>
%
% }
</select>
source
share