in reply to Re: Variable interpolation of object methods
in thread Variable interpolation of object methods

Or, even more obscure:
print "'@{[$gene->display_id]}'\n";

Replies are listed 'Best First'.
Re^3: Variable interpolation of object methods
by Anonymous Monk on Oct 30, 2010 at 23:37 UTC
    Any chance of an explanation rather than ever increasing obscurity ? :-D

      I believe it works like this:-

      $gene->display_id # Invoke the display_id # method of $gene object [ ] # construct anonymous array # around returned value(s) @{ } # dereference same " " # Interpolate into double- # quoted string

      although I'm sure others will correct me if I've got it wrong!

      Cheers,

      JohnGG

        And read Juerd's reply in this thread listing alternatives that are more efficient and easier to read.