Hello sandy105,
chomp removes the trailing newline from a string, if there is one; otherwise, it does nothing (unlike chop, which removes the final character from a string). To remove initial whitespace, you need something like this:
$line =~ s/^\s+//;
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Chomp not working
by Athanasius
in thread Chomp not working
by sandy105
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |