CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [adiab] Adding element to a hash: Edit Log



FishMonger
Veteran / Moderator

Sep 27, 2011, 8:44 AM


Views: 1228
Re: [adiab] Adding element to a hash

Since you're adding a new array element, you need to use push and since I don't like long lines, I'll break it up like this:


Code
push @{ $graphs{memory}{datasrc} }, {  
name => "bytes.$port",
draw => 'LINE',
label => 'Current Bytes Used',
min => 0
};



(This post was edited by FishMonger on Sep 27, 2011, 8:45 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Sep 27, 2011, 8:45 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives