piranhas has asked for the wisdom of the Perl Monks concerning the following question:
test.plxFORM IDTI ONNN CHRT . .
Chomp seems to affect $_ such that whenever I try to concatenate something to right of $_ (eg $_ . "somestring") the result is the right string overwrites the first characters on the left. Concatenations to the left of $_ work.while (<STDIN>) { chomp; print STDERR $_ . " is the symbol\n"; } $ cat symbols.txt | ./test.plx is the symbol is the symbol is the symbol is the symbol . . while (<STDIN>) { #chomp; print STDERR $_ . " is the symbol\n"; } $ cat symbols.txt | ./test.plx FORM is the symbol IDTI is the symbol ONNN is the symbol CHRT is the symbol ADI . .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: chomp problem
by davidrw (Prior) on Aug 17, 2005 at 20:45 UTC | |
by sgifford (Prior) on Aug 17, 2005 at 20:52 UTC | |
|
Re: chomp problem
by jdhedden (Deacon) on Aug 17, 2005 at 20:49 UTC | |
|
Re: chomp problem
by GrandFather (Saint) on Aug 17, 2005 at 20:54 UTC | |
|
Re: chomp problem
by jira0004 (Monk) on Aug 17, 2005 at 21:12 UTC | |
|
Re: chomp problem
by GrandFather (Saint) on Aug 17, 2005 at 21:35 UTC | |
|
Re: chomp problem
by spiritway (Vicar) on Aug 18, 2005 at 00:24 UTC |