Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Easy hash question (uninitialized value)

by marto (Archbishop)
on May 16, 2018 at 10:55 UTC ( #1214635=note: print w/replies, xml ) Need Help??


in reply to Easy hash question (uninitialized value)

Use chomp:

.... say 'Enter a number: '; my $number = <STDIN>; chomp( $number ); say $number; ....

Produces:

Enter a number: 4 4 bash done

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214635]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2018-07-22 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (451 votes). Check out past polls.

    Notices?