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 = ; my ( @codecs, @channelCap, @percentage ); ## declare codecs variable for ( my $i = 0 ; $i < $a ; $i++ ) { print( "Codec " . ( $i + 1 ) . " = " ); $tmp = ; push @codecs, $tmp; print( "Channel capacity of codec " . ( $i + 1 ) . " = " ); $tmp = ; push @channelCap, $tmp; print( "Percentage of codec " . ( $i + 1 ) . " = " ); $tmp = ; push @percentage, $tmp; } #### Print your input data #### print "No. Codec ChannelCap Percentage\n"; print diff \@codecs, \@channelCap, \@percentage, { STYLE => 'Table' };