Sorry, the whole program is 1000+ lines. I'll try to be more clear. I have two tree views, and I want a person to be able to select an element from one, press a button, and have that element to be added the second treeview on the right. Below are the declarations for both lists, The first is $Envs, the second is $EnvsToRun. Also, where I fill the first list, get the element that I want to put into the second list, and where I add the element to the second list. $duration and $config are variables that I am not having problems with.

$Envs = Gtk2::Ex::Simple::List->new_from_treeview ( $abaNewWindow->get +_widget('Envs'), 'Environments' => 'text'); $EnvsToRun = Gtk2::Ex::Simple::List->new_from_treeview ( $abaNewWindow +->get_widget('EnvsToRun'), 'Environments' => 'text', 'Duration' => 'd +ouble', 'Config' => 'int'); open(ENVIRONMENTS, "environments.txt"); while(<ENVIRONMENTS>){ my $line = $_; chomp($line); push @{$Envs->{data}}, $line; } close(ENVIRONMENTS); $environment = shift @{$Envs->{data}}; print $environment; push @{$EnvsToRun->{data}}, [$environment, $duration, $config];

In reply to Re^6: Shift returning pointer by rgb96
in thread Shift returning pointer by rgb96

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.