Solved

print dumper

Posted on 2009-05-05
2
333 Views
Last Modified: 2012-05-09
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
Comment
Question by:cucugirl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Expert Comment

by:Adam314
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

by:
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question