in reply to I dont understand what it is doing....
What this code above is supposed to be doing? , well, the subroutine named "query" has been declared, then when you call it and simultaneously provide arguments, it goes checking if these arguments correspond to the prototype predeclared.
After that each one of the arguments is read into the variables "$name, $type, $comb, @vals" and in the subsequent line @vals contents are modified via the map function and reassigned to @vals again.
The subroutine returns a string of @vals elements enclosed within () and joined together with '=' sign.
Welcome to the Monastery noobie82, familiarize yourself around and make a good use of the Perl documentations...
|
|---|