Still, there has got to be a better way than what you are doing. Perhaps you should use the named-parameter-list style of passing parameters to subroutines. Perhaps something like this?
print_html( onChange => qq{ document.approveform.command.value='approve'; document.approveform.submit(); }, onClick => qq{ if (this.disabled) { alert('some text!'); } } ); sub print_html { my %param = @_; print "onChange: $param{'onChange'}\n" if ( exists $param{'onChange'} ); print "onClick: $param{'onClick'}\n" if ( exists $param{'onClick'} ); }
In reply to Re^3: Regular expression problem
by saskaqueer
in thread Regular expression problem
by jockel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |