#!/usr/bin/perl use strict; use warnings; my $VAR1 = { 'File_Handler' => { 'Compile_File' => undef, 'Log_Details' => undef, 'Complete_Logging' => undef, 'Get_Config' => undef, 'Get_Data' => undef, 'Get_Abc_Data' => undef, 'Internal_Operations' => { 'Get_Abc_Data' => undef, 'Start_Operations' => undef, 'Get_Start_Up_Data' => undef, 'Construct_Failure_Ident' => undef, 'Construct_Additional_Words' => undef, }, 'Start_File_Handler' => undef } }; sub output_files { my $path = shift; my %hash = @_; for my $key (keys %hash) { if (ref $hash{$key}) { output_files("$path.$key",%{$hash{$key}}); } else { print "$path.$key.2.ada\n" } } } while (my($key, $value) = each %$VAR1) { output_files($key, %$value); }