#!/usr/bin/perl -w use strict; use Data::Dumper; my $data = "U|(Memory is incorrectly balanced between the NUMA "; $data .= "nodes of this system, which will lead to poor performance. "; $data .= "See),_NUMA_CRIT_,;(/proc/vmware/NUMA/hardware),_NUMA_CRIT_"; $data .= ",__REFERAL__file:__SELF__;( for details on your current "; $data .= "memory configuration),_NUMA_CRIT_,;"; (my $m_type = $data) =~ s/^((?:U|M))\|.*$/$1/; (my $p_list = $data) =~ s/^(?:U|M)\|(.*)$/$1/; my @sub_p_tmp = split(';',$p_list); my @args; for ( my $i = 0; $i <= $#sub_p_tmp; $i++ ) { if ( $sub_p_tmp[$i] =~ m/^\((.*)\),(.*),(.*)[,;]$/ ) { @args = ($1, $2, $3); } } #print "$m_type\n\n$p_list\n\n".Dumper(@sub_p_tmp)."\n"; print "\nArgs:\n"; print Dumper(@args)."\n";