tctoa has asked for the wisdom of the Perl Monks concerning the following question:
--> Output:use strict; use warnings; use Text::Diff; use List::Util qw( max ); my $a; ## The number of codec involes in mixed codecs. my $N; ## Channel capacity of mixed codec my $codecreference; ## declare codec for reference my ( $tmp, $total ) = ( 0, 0 ); print("Please input the number of codec that using "); $a = <STDIN>; my ( @codecs, @channelCap, @percentage ); ## declare codecs variabl +e for ( my $i = 0 ; $i < $a ; $i++ ) { print( "Codec " . ( $i + 1 ) . " = " ); $tmp = <STDIN>; push @codecs, $tmp; print( "Channel capacity of codec " . ( $i + 1 ) . " = " ); $tmp = <STDIN>; push @channelCap, $tmp; print( "Percentage of codec " . ( $i + 1 ) . " = " ); $tmp = <STDIN>; push @percentage, $tmp; } #### Print your input data #### print "No. Codec ChannelCap Percentage\n"; print diff \@codecs, \@channelCap, \@percentage, { STYLE => 'Table' };
--> If I remove a element such as \@percentage, I can print. But this is not my expectation. I want to show many rows, columns. So, can anyone help me on this? Thanks so much.Please input the number of codec that using 2 Codec 1 = 0 Channel capacity of codec 1 = 0 Percentage of codec 1 = 0 Codec 2 = 0 Channel capacity of codec 2 = 0 Percentage of codec 2 = 0 No. Codec ChannelCap Percentage Not a HASH reference at C:/Strawberry/perl/vendor/lib/Text/Diff.pm lin +e 46, <STDIN> line 7.
2019-07-03 Athanasius promoted to root node; previously a reply to Text::Diff::Table output, but want to show all lines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Text::Diff::Table output, but want to show all lines
by haukex (Archbishop) on Jun 30, 2019 at 09:17 UTC | |
by tctoa (Novice) on Jul 05, 2019 at 08:22 UTC | |
by haukex (Archbishop) on Jul 07, 2019 at 09:28 UTC | |
by tctoa (Novice) on Jul 08, 2019 at 14:59 UTC |