Scott R. Godin wrote: > Robert Citek wrote: > >> >> On Jul 19, 2005, at 5:19 PM, Wiggins d'Anconia wrote: >> >>> Close. You want a hash slice. >>> >>> @[EMAIL PROTECTED] = @vals; >>> >>> A marvelously Perlish construct. >>> >>> http://danconia.org >> >> >> >> Sweeeeet! Thanks a bunch. >> >> Do you have a good reference which explains this? I've looked in >> both the Camel and Llama books, but didn't see the @$ construct >> anywhere. >> > > basically it's shorthand for the more obvious and well documented > @{$reference} notation. > > great detail on this can be found in the perldocs: perlreftut perlref > perldsc and perllol > > Personally I feel the shorthand way makes it slightly more difficult WRT > maintenance. Fine for one-offs but for long term multiline code, the > long form would likely be preferable as it makes it easier to see just > exactly what's going on there. >
I recognize that you said "Personally I feel..." so there is certainly nothing wrong. I will counter that the additional {} just add clutter where it isn't needed. Another example is parentheses around function arguments that don't require them. I am not a key stroke counter, but adding the grouping where it isn't necessary *can* (not "does" for everyone) make it much more difficult to read because you have to constantly see where you are matched to. Just my $.02 on style... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>