Hello Kind Monks:

I have again painted myself into a corner with a variant array. Below please find the output from dumper from the following code. I need to get at the string within the array.

please what am I doing wrong

use IO::File; use Data::Dumper; use Win32::ODBC; use Win32::OLE; use Win32::OLE::Variant; $blpData = Win32::OLE->new('Bloomberg.Data.1') or die "can NOT load t +he blpData" ; $aSec = Variant(VT_BSTR, "MMM US equity"); $aFields = Variant(VT_ARRAY|VT_BSTR, 1); $aFields->Put(0,"RELATED_EQUITIES") ; $bbData = Variant(VT_EMPTY,1) ; $bbData = $blpData->BLPSubscribe($aSec, $aFields ); print "Error: " . Win32::OLE->LastError . "\n"; #** print " ** ** ** Dumper " . "\n"; print Dumper $bbData; print "\n\nbbdate 0 0 " . "\n"; print $bbData->[0][0]. "\n"; print " ** ** ** Dumper bbdata 0 0 " . "\n"; print Dumper $bbData->[0][0] ; #**print "\n\nbbdata 0 0 0 " . "\n"; #**print $bbDate->[0][0][0] ; #**for my $e (@$bbDate->[0][0]) { #** for my $e2 (@$e ) { #** print "e2: " . $e2 . "\n"; #** } #**}

This is the output.

Error: 0 ** ** ** Dumper $VAR1 = [ [ [ [ 'MMM US' ], [ 'MMM-W US' ], [ 'MMN LI' ], [ 'MMM LN' ], [ 'MMMU NA' ], [ 'MH FP' ], [ 'MMM GR' ], [ 'MMM NA' ], [ 'MMM SW' ], [ 'MMM ES' ], [ 'MMM* MM' ], [ '4851 JP' ], [ 'MMM AR' ], [ 'MMMB AR' ], [ 'MMMC AR' ], [ 'MMMD AR' ], [ '2900086QUS' ], [ 'MTSI GR' ], [ 'RNIC US' ], [ 'AIV CN' ], [ 'AITYF US' ], [ '287476Z US' ], [ '290207Z SS' ], [ '366565Z US' ], [ 'CUNO US' ], [ '877720Q GR' ], [ '342637Z US' ], [ 'WTCO US' ], [ 'IZ3 GR' ], [ '690410Z US' ], [ '761812Z US' ], [ '763279Z US' ], [ '763287Z US' ], [ '791479Z US' ], [ '821743Z US' ], [ '192906Z CN' ], [ 'MMGG IX' ], [ '844550Z US' ], [ '898395Z US' ], [ '957861Z US' ], [ '957845Z US' ], [ '974396Z CI' ], [ 'EWD LN' ], [ 'EWD PO' ], [ 'TDC LN' ], [ 'TDC PO' ], [ 'TCPMF US' ], [ 'TYCRF US' ], [ '1272Q LN' ], [ 'UKW GR' ], [ 'EWD IX' ], [ 'EWDA LN' ], [ '990860Z US' ], [ 'BOI LN' ], [ 'BOI PO' ], [ '1018596QGR' ], [ 'BEIOF US' ], [ '217486Z DC' ], [ '346309Z AU' ], [ '699471Z IM' ], [ 'BOI PZ' ], [ 'BOIA LN' ], [ 'BOI IX' ], [ 'BOI VX' ], [ '2232585ZUS' ], [ '2237391ZBZ' ], [ '2253959ZUS' ], [ '2279872ZUS' ], [ '2270846ZPW' ], [ '2283548ZUS' ], [ '2315340ZUS' ], [ '2725398ZUS' ], [ '2751472ZUS' ], [ '2811825ZUS' ], [ '2884739ZAU' ], [ '2818278ZUS' ], [ '2853196ZGR' ], [ '2971317ZUS' ], [ '2912083ZSW' ], [ '2909838ZFP' ], [ '2909830ZFP' ], [ '244895Z US' ], [ '3085285ZNO' ], [ '3092795ZIM' ], [ '3041954ZFP' ] ] ] ]; bbdate 0 0 ARRAY(0x1abebe8) ** ** ** Dumper bbdata 0 0 $VAR1 = [ [ 'MMM US' ], [ 'MMM-W US' ], [ 'MMN LI' ], [ 'MMM LN' ], [ 'MMMU NA' ], [ 'MH FP' ], [ 'MMM GR' ], [ 'MMM NA' ], [ 'MMM SW' ], [ 'MMM ES' ], [ 'MMM* MM' ], [ '4851 JP' ], [ 'MMM AR' ], [ 'MMMB AR' ], [ 'MMMC AR' ], [ 'MMMD AR' ], [ '2900086QUS' ], [ 'MTSI GR' ], [ 'RNIC US' ], [ 'AIV CN' ], [ 'AITYF US' ], [ '287476Z US' ], [ '290207Z SS' ], [ '366565Z US' ], [ 'CUNO US' ], [ '877720Q GR' ], [ '342637Z US' ], [ 'WTCO US' ], [ 'IZ3 GR' ], [ '690410Z US' ], [ '761812Z US' ], [ '763279Z US' ], [ '763287Z US' ], [ '791479Z US' ], [ '821743Z US' ], [ '192906Z CN' ], [ 'MMGG IX' ], [ '844550Z US' ], [ '898395Z US' ], [ '957861Z US' ], [ '957845Z US' ], [ '974396Z CI' ], [ 'EWD LN' ], [ 'EWD PO' ], [ 'TDC LN' ], [ 'TDC PO' ], [ 'TCPMF US' ], [ 'TYCRF US' ], [ '1272Q LN' ], [ 'UKW GR' ], [ 'EWD IX' ], [ 'EWDA LN' ], [ '990860Z US' ], [ 'BOI LN' ], [ 'BOI PO' ], [ '1018596QGR' ], [ 'BEIOF US' ], [ '217486Z DC' ], [ '346309Z AU' ], [ '699471Z IM' ], [ 'BOI PZ' ], [ 'BOIA LN' ], [ 'BOI IX' ], [ 'BOI VX' ], [ '2232585ZUS' ], [ '2237391ZBZ' ], [ '2253959ZUS' ], [ '2279872ZUS' ], [ '2270846ZPW' ], [ '2283548ZUS' ], [ '2315340ZUS' ], [ '2725398ZUS' ], [ '2751472ZUS' ], [ '2811825ZUS' ], [ '2884739ZAU' ], [ '2818278ZUS' ], [ '2853196ZGR' ], [ '2971317ZUS' ], [ '2912083ZSW' ], [ '2909838ZFP' ], [ '2909830ZFP' ], [ '244895Z US' ], [ '3085285ZNO' ], [ '3092795ZIM' ], [ '3041954ZFP' ] ];

In reply to variant array by kevind0718

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.