Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks for the response but if you see my code I pasted my code between . I really don't know why are you angry with me ... I am expecting output as device name which I stated in my previous reply. Please don't be angry my apologies. I am able to read my code clearing I don't know why are you saying unreadable mess .... I am again pasting it ...
sub updatedevice() { my $n = {}; my $Device_LINK = $server->object("ICF_PersistentDataSet",$devicelinks +); my $Temp_Device_LINK = $server->object("ICF_PersistentDataSet",$tempde +vicelinks); my @current_devicelist = @{ $Device_LINK->invoke("get") }; my @temp_devicelist = @{ $Temp_Device_LINK->invoke("get") }; my %temp_list; my %current_list; my $size = @current_list; for ($n=0; $n < $size; $n++) { our $device=$current_list[$n][0]; DEBUG( "DEBUG: - devicelinks values $device " ); my $size = @temp_list; for ($n=0; $n < $size; $n++) { our $tempdevicelinks=$temp_list[$n][0]; DEBUG( "DEBUG: - temp plc links values $tempdevicelinks " ); my %count = (); foreach my $device (@current_list, @temp_devicelist) { $count{$device}++; } my @difference = grep { $count{$_} == 1 } keys %count; my @intersect = grep { $count{$_} == 2 } keys %count; my @union = keys %count; DEBUG( "DEBUG: - difference links values $difference[0] " ); DEBUG( "DEBUG: - intersect links values $intersect[0] " ); DEBUG( "DEBUG: - union links values $union[0] " ); } } }

expected output device names Also I am able to read $device and $tempdevicelinks values as "ABC-DCFE41->90" "GHJKL-poiu->78"

In reply to Re^4: compare 2 arrays for intersect diff and commmon values by rasgolla
in thread compare 2 arrays for intersect diff and commmon values by rasgolla

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-10-06 13:43 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (26 votes). Check out past polls.