Solved

# print dumper

Posted on 2009-05-05
320 Views
I'm trying to assing a user's input to a string.. why when i chomp the input and use print Dumper does the outcome look like this:
I typed the word enter

with chomp:
';AR1 = 'Enter;

with no chomp:
$VAR1 = 'Enter '; my$input = <>;

chomp ($input);  0 Question by:cucugirl 2 Comments LVL 39 Expert Comment ID: 24305415 The$input after <> will have a newline character on it.  The chomp will remove the newline character.   If there is a newline, the Dumper will display it.
0

LVL 84

Accepted Solution

ozo earned 125 total points
ID: 24306393
l\it looks like you have "\r\n" at then end p $input and a "\r" at the end of$input after the chomp
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans