Cannabishop
Programmer
For the life of me I cannot figure out how to change my input from decimal to hexadecimal. Can anyone (although, it will probably be everyone) help me with the code for this?
My exisiting code is below:
#!/usr/bin/perl
use strict;
use warnings;
my @line;
my $x;
my $sum=0;
my $num;
print "Please enter 10 numbers, one per line\n";
for ($x=0; $x<10;$x++)
{
$line[$x] = <STDIN>;
}
chomp @line;
print "\t\t\tReport for Glen Lederman\n\n";
print "\tAll the Values : \t\t@line\n";
print "\tSame Values Backwards :\t\t".reverse("@line")."\n";
$sum += $_ for @line;
print "\tSum of the Values: \t\t$sum\n";
print "\tThe Values in Hexadecimal:\t\t\n";
What is so simple that I am missing it completely??
My exisiting code is below:
#!/usr/bin/perl
use strict;
use warnings;
my @line;
my $x;
my $sum=0;
my $num;
print "Please enter 10 numbers, one per line\n";
for ($x=0; $x<10;$x++)
{
$line[$x] = <STDIN>;
}
chomp @line;
print "\t\t\tReport for Glen Lederman\n\n";
print "\tAll the Values : \t\t@line\n";
print "\tSame Values Backwards :\t\t".reverse("@line")."\n";
$sum += $_ for @line;
print "\tSum of the Values: \t\t$sum\n";
print "\tThe Values in Hexadecimal:\t\t\n";
What is so simple that I am missing it completely??