Re: usage of Split on pattern matching

2010-07-19 Thread Chandan Kumar
Thanks guys, I could able to understand split fun. --- On Mon, 19/7/10, John W. Krahn wrote: From: John W. Krahn Subject: Re: usage of Split on pattern matching To: "Perl Beginners" Date: Monday, 19 July, 2010, 4:29 PM Chandan Kumar wrote: > Hi all, Hello, > Iam beginner

Re: usage of Split on pattern matching

2010-07-19 Thread John W. Krahn
Chandan Kumar wrote: Hi all, Hello, Iam beginner to perl& i have a small query on split. using split i want print everything even the character used to split on string. Here is my example : my $string = "hi123now456itstimeforsplit789right" my @array = split ( '/(\d+\s)/ ',$string); ## Try

Re: usage of Split on pattern matching

2010-07-19 Thread Chas. Owens
On Mon, Jul 19, 2010 at 08:14, Chandan Kumar wrote: snip > my $string = "hi123now456itstimeforsplit789right" > my @array  = split ( '/(\d+\s)/ ',$string); snip > When I run the program ,it prints the whole string. so my assumption is wrong. > > please Could some one explain me on this? snip The s