You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
277 B
Perl

5 years ago
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");