catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:
I got a parsing script to work on a regular file. Now, when I try to use with an XML file to doesn't work, (no ouput). I even tried a regular print statement after creating the array, (\n\n\ELEPHANTS), Below is the code.
my $line = <>; print "This is what line looks like $line \n"; while (defined($line = <>)) { #chomp($line); print "This is what line looks like $line \n"; my @items = (split /N/, $line); #printf "\n\n\nCustomer Name: %-24s \n", $items[31], $items[32], [ +33]; print "\n\n\n.ELEPHANTS\n"; }
TIA The Catfish
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parse Question
by Corion (Patriarch) on Dec 10, 2019 at 16:59 UTC | |
by catfish1116 (Beadle) on Dec 10, 2019 at 17:41 UTC | |
by Corion (Patriarch) on Dec 10, 2019 at 17:56 UTC | |
by catfish1116 (Beadle) on Dec 10, 2019 at 20:27 UTC | |
by Corion (Patriarch) on Dec 10, 2019 at 20:33 UTC | |
Re: Parse Question
by hippo (Archbishop) on Dec 10, 2019 at 19:06 UTC | |
by catfish1116 (Beadle) on Dec 10, 2019 at 20:30 UTC | |
by hippo (Archbishop) on Dec 11, 2019 at 09:37 UTC | |
by AnomalousMonk (Archbishop) on Dec 10, 2019 at 22:00 UTC | |
Re: Parse Question
by karlgoethebier (Abbot) on Dec 10, 2019 at 19:17 UTC |