13 lines
277 B
Perl
13 lines
277 B
Perl
If they do, chomp removes them.
|
|
|
|
#!/usr/local/bin/perl
|
|
|
|
$/ = "::"; # set input line separator
|
|
$scalar = "testing::";
|
|
$num = chomp($scalar);
|
|
print ("$scalar $num\n");
|
|
@list = ("test1::", "test2", "test3::");
|
|
$num = chomp(@list);
|
|
print ("@list $num\n");
|
|
|
|
|