10.4 Named Parameters
For most CGI.pm methods, there are two syntax styles. In the "standard" style, the position of the parameters determines how they will be interpreted - for example, parameter 1 is the name that the script should assign, parameter 2 is the initial value, etc. For example:
In the "named parameters" style, the parameters can be assigned like a hash, and the order doesn't matter. For example:print $query=textfield('username', 'anonymous');
If you want to use named parameters, just call theprint $query->textfield(-name=>' name ', -default=>' value ');
Copyright © 2001 O'Reilly & Associates. All rights reserved.