in reply to Simplifying repeated parameter lists
Take advantage of list flattening:
{ # new scope so we don't blow up another @t my @t = ($handle, $not_today, $thingie); submit_thingamabob(@t, "Foo!", 234); submit_thingamabob(@t, "Frob!",23); submit_thingamabob(@t, "Forb!",54); submit_thingamabob(@t, "ooF!",11); submit_thingamabob(@t, "broF!",fakenum); submit_thingamabob(@t, "Frap!",458); }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Simplifying repeated parameter lists
by Voronich (Hermit) on Sep 19, 2012 at 19:52 UTC | |
by BrowserUk (Patriarch) on Sep 19, 2012 at 20:00 UTC |