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

Any chance of an explanation rather than ever increasing obscurity ? :-D
  • Comment on Re^3: Variable interpolation of object methods

Replies are listed 'Best First'.
Re^4: Variable interpolation of object methods
by johngg (Canon) on Oct 31, 2010 at 00:45 UTC

    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

Re^4: Variable interpolation of object methods
by ambrus (Abbot) on Oct 31, 2010 at 10:21 UTC
      And read Juerd's reply in this thread listing alternatives that are more efficient and easier to read.
        If i'm not mistaken, the explanation given on the Perl idioms explained page is the same as the explanation i offered in my previous comment which I quite here
        are you creating a reference to this variable $gene->display_id and th +en deferencing it straight away with ${ }
        I'm double checking as I'm not very confident with perl