See if this meets your needs:
http://www.arl.wustl.edu/projects/fpx/references/perl/cookbook/ch04_07.htm


Mike


On 11/25/2015 1:53 AM, beginners-digest-h...@perl.org wrote:




Hi

I want to create a unique array .

I have the code below. It is creating a array which will have duplicate data . How can I filter duplicate data ?

#!/usr/bin/perl

use Data::Dumper;

#my $cnt = scalar @$net_int_parsed_output; $net_int_parsed_output = [lif_1 ,lif_2,lif_3,lif_4,lif_1,lif_2]; foreach my $n (@$net_int_parsed_output){

        my $lif_cnt++;

        print "lif of vserver >>> $n\n";

push (@{$lun_PR_resv_info->{'lun'}->{'vserver'}->{'fcp_lifs'}},$n);

}

print "lun PR resv related info>>>>>>>>>>>>>",Dumper $lun_PR_resv_info,"\n";


Thanks

Sunita


Reply via email to