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
';
I typed the word enter
with chomp:
';AR1 = 'Enter;
with no chomp:
$VAR1 = 'Enter
';
my $input = <>;
chomp ($input);
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.