I apologize for maybe asking a dummy question. I've just started learning Perl on my own and no one around to ask.
I've created the script which should prompt to enter the hex digits and then convert them in to decimal. Here it is:
#!/usr/bin/perl -w
use strict;
use warnings;
print "Please, enter the hex number: \n";
my $hex = <STDIN>;
print "$hex", "\n";
chomp ($hex);
print "You've entered hex: ", $hex, "\n";
print "The decimal equivalent is ", hex "$hex", "\n";
Generally saying, this script works correctly. However, whatever I've tried, I could not make this first prompting text to be printed. I've just submit my hex digits blindly and receive a correct result. This is what was returned for hex FF:
ff
Please, enter the hex number:
You've entered hex: ff
The decimal equivalent is 255
I wanted to ask why that prompting text "Please, enter the hex number:" is not printed?