c_config has asked for the wisdom of the Perl Monks concerning the following question:
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:#!/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";
I wanted to ask why that prompting text "Please, enter the hex number:" is not printed?ff Please, enter the hex number: You've entered hex: ff The decimal equivalent is 255
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: The text preceding <STDIN> is not printed
by afoken (Chancellor) on Aug 17, 2016 at 19:09 UTC | |
by flowdy (Scribe) on Aug 18, 2016 at 14:07 UTC | |
by soonix (Chancellor) on Aug 19, 2016 at 10:03 UTC | |
Re: The text preceding <STDIN> is not printed
by c_config (Initiate) on Aug 17, 2016 at 20:23 UTC |