• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

print dumper

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);

Open in new window

0
cucugirl
Asked:
cucugirl
1 Solution
 
Adam314Commented:
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
 
ozoCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now