in reply to unable to pass data

hi poj :

please do not get frustated with my question as i do not have much experience with perl just started learning. The code worked which you gave.Thanx for dat.. But i cannot use DATA as i want to send the xml files from my client code,as it will be sending multiple xml files in some few fixed interval by reading from a particular directory. But why you saying "joining the 3 xml files into one will not produce a valid xml file". Then why it works in parsing..?and why not in insertion..?

Replies are listed 'Best First'.
Re^2: unable to pass data
by poj (Abbot) on Jun 03, 2014 at 19:54 UTC

    You have many components so it's important to get each one working separately before trying them all togther

    Try the script with
    my $xml = do { local $/; <DATA> };
    as I have provided and only if that works change it to
    my $xml = $cgi->param("POSTDATA");

    If it fails at the point it means that the XML being sent is not valid and we can move on to sorting out the client code

    If the script I provided does not work then you have a bigger problem !

    poj