Link to home
Start Free TrialLog in
Avatar of cucugirl
cucugirl

asked on

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

Avatar of Adam314
Adam314

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.
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial