Hello,

I think what you want to do is first remove the newline character _then_
split the list.
ie.
open F, "....
my @list;
while(<F>){
  chomp; # remove the \n
  push @list, split/\t+/;  # add items to @list
}

Hope this helps,,,

Aziz,,,

In article <000901c115e3$31a71ec0$[EMAIL PROTECTED]>, "Daniel Mester"
<[EMAIL PROTECTED]> wrote:

> Hi again,
>  for example i have a file like :
> zxcv  zxcv
> qwer  asdf
> bnmm  sdfgy
> 
> I need to split the sentences into a variables in list. So i do it in 2
> stages:
> 1. Remove the \t form each pair:
> foreach (@list) { push(@temp, (split(/\t+/, $_))); }
> 
> 2. Then i remove the \n between the strings: foreach (@temp) {
> push(@temp2, (split(/\n/, $-))); }
> 
> I am wondering - is there a way to do it in one turn? Must be, no?
> 
> Daniel.
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to