Using -a (autosplit) -F (split delimiter), -n (read file line by line) -l (add newlines): See perlrun
Switch "s for 's on a unix system.
C:\test>perl -aF"\|" -nle"print join '|', @F[0,1]" junk6.pl 271479 | Papaya leaf curl Guandong virus 12202 | Lettuce mosaic virus 116056 | Pelargonium zonate spot virus 45709 | Sabia virus
In reply to Re: formating data input
by BrowserUk
in thread formating data input
by manu7495
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |