in reply to Chomp Command
use strict; use warnings; my $x = "foo\n"; my $count = chomp $x; print "$count\n"; my @arr = ("bar\n", "boo\n"); $count = chomp @arr; print "$count\n"; __END__ Prints out: 1 2
Before you ask any more questions, write some code, run the code, and see if you understand the results.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Chomp Command
by sarathi.mh (Initiate) on Sep 17, 2010 at 18:53 UTC |