Re: perl: Split loop at...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try:

	@x2 = split(/,|;/, $token);

That worked for me properly, while the code you provided displayed the
error.  I'm also running v5.8.0, but LANG=en_US.UTF-8.

--Ade.


> > #!/usr/bin/perl
> > 
> > while(<>)
> > {
> >         @x1 = split(/[\t\n ]+/, \$_);
> > print \$., " ", scalar @x1, ": ";
> >         foreach \$token (@x1)
> >         {
> >                 @x2 = split(/[,;]/, \$token);
> > print scalar @x2;
> >         }
> > print "\n";
> > }



-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux