From: Kevin Viel <[EMAIL PROTECTED]> > > > my %fruit_color = ( apple => "red" > > > , banana => "yellow" > > > ) ; > > > > Sure, you can use it, you can skip it, whichever works better > > for you. > > (I find this style ... erm ... strange, but that's your decision.) > > > Thanks for your reply. Could you clarify whether by "style" you meant > omitting the last comma or the use of white space to align the comma under > the parentheses? If it is the later, I initially found it strange, but I > appreciated how easy it was to see that a comma was in place and how > comments might fit: > > my %fruit_color = ( apple => "this is too long and with a > narrow monitor the comment at the end might be hard to see" > , banana => "yellow" > , durian_that_smelly_fruit => "short value but long key" > ) ; > > my %fruit_color = ( apple => "red" # comment: could change to > golden > , banana => "yellow" > ) ;
Yes, it as the later. Like every other style it has its pros and cons. This one is pretty unusual in the Perl community as far as I can say. Plus it tends to need a lot of space, maybe my %fruit_color = ( apple => "this is too long and with a narrow monitor the comment at the end might be hard to see" , banana => "yellow" , durian_that_smelly_fruit => "short value but long key" ) ; though then the apple doesn't allign with the banana. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/