If my array contains elements like then I have to take some action.I have used ($array[0] eq " ") in the if condition.Is it a right way to do ? If any body knows about it then kindly let me know about.

I am a little uncertain as to what you mean when you say that the array is empty, because your pseudo code says

all the elements of @array contains &nbsp

This is not the same as an empty array. An empty array has no elements.

So, if you want to test if any of your array elements have somthing other than blank characters, you would need something different.

if (! @array) {
# there are NO elements, do what you need to do
}
elsif (grep ! /^\s*$/, @array) {
# there are elements in your array, and at least one
# of them contains a string that has something other
# than spaces
}
else {
# there are elements in your array, but they are either
# empty strings, or strings with spaces
}

Using defined on an aggregate's been out of fashion for a good while now.

$ perl -e 'use strict;use warnings;my @foo;if( defined @foo ) { print +"foo" }' |& splain
defined(@array) is deprecated at -e line 1 (#1)
(D deprecated) defined() is not usually useful on arrays because i+t
checks for an undefined scalar value. If you want to see if the
array is empty, just use if (@array) { # not empty } for example.
(Maybe you should just omit the defined()?)