I have an some attributes with values stored in an array as below, now i need to perform some checks on attribute values,Suggest me how can i proceed in perl.
@arr1 = `cat passwd.txt|tr ' ' '\n'|egrep -i "maxage|minage"|sort'`;
array arr1 contains info as "maxage=0 minage=0"
In this i need to perform if condition on the value of maxage, is there any way like below, suggest me as i am new to perl.
if ( @arr1[0]|awk -F= '{print $2}' == 0 )
{
printf "Then print task done";
}