http://www.perlmonks.org?node_id=1070293

asham has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I am facing following issue:

1) Several tasks are performed and an array reference is returned.

2) We use this array reference to check for existence of elements containing "only white-space characters" and remove those elements.

3) The final array reference should contain valid data or might be empty after 2). For the same final array reference, we take dump using Data::Dumper module and interestingly we are getting following:

$VAR1 = [ ' ];

Also the same array reference was confirmed to be containing 1 element using (scalar @$arrayReference). Could someone please tell me what this corresponds to? what could the data element be expected to be?

As per my understanding, a 'can not be printed by itself. For that we get something like:

$VAR1 = [ '\'' ];

I guess I a missing something trivial here. Please help.