Re: split slice question

[email protected] (Gunnar Hjalmarsson)
Newsgroups perl.beginners
Message-ID <[email protected]>
Richard Lee wrote:
> 
> my ($moe,$hae,$now) = (split(/|/,$array))[0,1,2];

'|' is special in a regular expression and needs to be escaped.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.