Input values from keyboard
Assuming i = 3 There're 3 parameters need to input: type of codecs @codecs = (g711, g722, g729); @channelCap = (1000, 2000, 3000) ; @percentage = (0.5, 0.3, 0.2)$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; }
Output 4 columns: No. | Codec | ChannelCap | Percentage. Each parameter has corresponding values (here is 3). This is the number of row need to show.
Actually, I only get output bellow:print "No. Codec ChannelCap Percentage\n"; print diff \@codecs, \@channelCap, \@percentage, { STYLE => 'Table' };
Please input the number of codec that using 3 Codec 1 = g711 Channel capacity of codec 1 = 1000 Percentage of codec 1 = 0.5 Codec 2 = g722 Channel capacity of codec 2 = 2000 Percentage of codec 2 = 0.3 Codec 3 = g729 Channel capacity of codec 3 = 3000 Percentage of codec 3 = 0.2 No. Codec ChannelCap Percentage Not a HASH reference at C:/Strawberry/perl/vendor/lib/Text/Diff.pm lin +e 46, <STDIN> line 10.
In reply to Re^3: Text::Diff::Table output, but want to show all lines
by tctoa
in thread Text::Diff::Table output, but want to show all lines
by tctoa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |