in reply to Chomp is removing the whole word instead of the newline
I hope you get what i'm trying to say ...... my @row = split (/,/,$_); # I believe this is what you trying to do chomp( my $var = $row[1]); # Or maybe a little bit more understandable $var = $row[1]; chomp $var; # Return the total number of characters removed in $row[1] to $chomp_r +esult # (in your case every 1 stands for a character chomp found in $row[1] +could # be a line break or something like that ) my $chomp_result = chomp( $row[1]); print "$var || $chomp_result\n"; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Chomp is removing the whole word instead of the newline
by slayedbylucifer (Scribe) on Jul 26, 2012 at 03:49 UTC | |
|
Re^2: Chomp is removing the whole word instead of the newline
by slayedbylucifer (Scribe) on Jul 26, 2012 at 03:47 UTC |