split slice question
[email protected] (Richard Lee)
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
I use this before (split slice ) but it's working bit funny now.. can someone tell me why?? it looks like it's splitting on '' instead of /|/ as I have specified below... ?? use strict; use warnings; my $array = q/hi|how|are|you|fine/; my ($moe,$hae,$now) = (split(/|/,$array))[0,1,2]; print "$moe $hae $now\n"; [root@RLEE ~]# ./!$ ././split_practice.pl h i |