in reply to how can i check an array element as empty or not

$usage_grpinf[2] may be undefined or contains spaces/characters.

add "use strict" or/and "use warnings". If $usage_grpinf[2]is undefined, it will give such warnings when you execute the program.

also try printing $usage_grpinf[2] enclosed in brackets so you'll know if it contains spaces or newlines i.e.
print "usage_grpinf[2] : |$usage_grpinf[2]|\n";
  • Comment on Re: how can i check an array element as empty or not

Replies are listed 'Best First'.
Re^2: how can i check an array element as empty or not
by Anonymous Monk on Jul 21, 2009 at 07:27 UTC
    you could also
    C:\>perl -le print(chr(9)) |cat -v ^M C:\>perl -le print(chr(9)) |od -tax1 0000000 ht cr nl 09 0d 0a 0000003 C:\>perl -le print(chr(9)) |hexdump 00000000: 09 0D 0A - | | 00000003;
Re^2: how can i check an array element as empty or not
by Anonymous Monk on Jul 21, 2009 at 06:21 UTC
    Thanks all, It had a tab as the element :)