in reply to Re: help with (what I consider) a strange problem
in thread help with (what I consider) a strange problem

Nope... chomp returns number of chars chopped. So:
$t = "t\n"; $num = chomp($t); print "$num"
prints "1", whereas:
$t = "t"; $num = chomp($t); print "$num"
prints "", whereas:
@t = ("t\n","u\n","v","w\n"); $num = chomp(@t); print "$num";

prints "3".

(edited: error in my code fixed)