Explaination:chomp($line1=<DATA>); my @row = split("\t",$line1) ; print $row[0]; __DATA__ hello world
1), From perldoc: You can actually chomp anything that can be an lvalue. FileHandle cannot be an lvalue.
2), chomp returns the number of characters removed. For the other part, use substr($string,0,-1) type variation.
In reply to Re: Chomp(<handle>)
by artist
in thread Chomp(<handle>)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |