in reply to Re: Writing a file from foreach loop
in thread Writing a file from foreach loop

Thank you for your review, it helps. But I still have question on entering data in a file in foreach loop

Replies are listed 'Best First'.
Re^3: Writing a file from foreach loop
by poj (Abbot) on Sep 20, 2017 at 06:37 UTC

    Reduce your script down to the problem area and use Data::Dumper to debug it.

    #!/usr/bin/perl; use strict; use warnings; use Data::Dumper; use lib '/home/rahul/Documents/'; use script::readxmlcid qw(get_child_node_value); use XML::LibXML; my $dom = XML::LibXML->load_xml(location => $ARGV[0]); my @forms_required = ("createnewcid", "customerform"); foreach my $config_forms (@forms_required) { my @child_node_values_fill = get_child_node_value($config_forms); print Dumper $config_forms,\@child_node_values_fill; }
    poj