in reply to Re^2: Check for data in array
in thread Check for data in array

Use Data::Dumper, try
warn Dumper \%sections;
before matching the regexp. With your sample data contained as string in the hash, everything should work.

Replies are listed 'Best First'.
Re^4: Check for data in array
by fazedandconfused (Novice) on Feb 08, 2012 at 15:08 UTC

    I've added warn Dumper \%sections; into my script and it still doesn't work. Any further ideas?

      Use Dumper as a debugging tool. What does it print to STDERR?