in reply to Re^3: removing perldata , hashref from XML file
in thread removing perldata , hashref from XML file

Hi,

Many Thanks for answering me, would you mind please give me a guide where in the code i should add the return value?

!/usr/bin/perl -w use strict; use warnings; use Data::Dumper; use XML::Dumper; use TAP3::Tap3edit; $Data::Dumper::Indent=1; $Data::Dumper::Useqq=1; my $dump = new XML::Dumper; use File::Basename; my $perl=''; my $xml=''; my $tap3 = TAP3::Tap3edit->new(); foreach my $file(glob 'X*') { my $files= basename($file); my $filename=$files.".xml\n"; print $filename; $tap3->decode($files) || die $tap3->error; $perl = $tap3->structure; $dump->pl2xml($perl, $filename); }

Replies are listed 'Best First'.
Re^5: removing perldata , hashref from XML file
by AnomalousMonk (Archbishop) on May 16, 2020 at 05:49 UTC
    ... where ... i should add ...

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

    You misunderstand. This is choroba's code "signature" on PerlMonks.

    c:\@Work\Perl\monks>perl -wMstrict -e "print map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1], +[{}],[sub{}^*ARGV,3] " JApH,
    JApH stands for Just Another Perl Hacker. :) Please consider the advice given in the body of choroba's reply.


    Give a man a fish:  <%-{-{-{-<

      Oh yeah, I am so new to perl. I updated my code :-(
Re^5: removing perldata , hashref from XML file
by haukex (Archbishop) on May 16, 2020 at 06:06 UTC

    You've just re-posted the code from your first node, it looks like you haven't even tried to incorporate the suggested code. You'll tend to get better responses if you show your efforts. Also, see this: when you edit a node, make sure to mark your updates, so that replies aren't confusing.

    Anyway, as choroba and I said, the code I showed is a replacement for XML::Dumper, and my example $data can be removed and your $perl variable can be used instead.

      Accept my apalogies. I promise it will never happened again.