The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I am off on a jobsite without my trusty Perl CD Bookshelf.
I need(want) to pass named parameters to a subroutine, ala CGI.. do_this_cool_function (-retire=>'early', -payscale=>-55.00, -pizza=>'cold', -beer=>none); I'm using 'use strict' and '-w'. The compiler throws up on my shoes with "Can't use string ("-spot") as a HASH ref while "strict refs" in use at t.pl line 13." A) What do I need to do remove this error, B) How do I access the named arguments in the subroutine?. In reply to Passing named parameters by jcwren
|
|