Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
Solved

# print dumper

Posted on 2009-05-05
Medium Priority
343 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 85

Accepted Solution

ozo earned 500 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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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
###### Suggested Courses
Course of the Month14 days, 1 hour left to enroll