Re: split and extraction

2002-01-30 Thread John W. Krahn
Dhiraj P Nilange wrote: > > Hi there Hello, > I want to extract some word after space from some string. > Somebody from the mailing list had given me above > command. > > suppose I wanto extract 8th word... Perl arrays are indexed starting at zero (0) so the eighth word in an array would be i

RE: split and extraction

2002-01-30 Thread Jonathan E. Paton
> I want to extract some word after space from some string. > Somebody from the mailing list had given me above > command. > [snip] > but it doesnt work. If I use some array in the split > function like:- > > @array=split(/\s+/,$abc); > print $array[8]; > > this way it works. But I dont want t

RE: split and extraction

2002-01-30 Thread Hanson, Robert
you use below (the one that works). Rob -Original Message- From: Dhiraj P Nilange [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:19 AM To: [EMAIL PROTECTED] Subject: split and extraction Hi there I want to extract some word after space from some string. Somebody from th

RE: split and extraction

2002-01-30 Thread Nikola Janceski
n for [$#_]. -Original Message- From: Dhiraj P Nilange [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 10:19 AM To: [EMAIL PROTECTED] Subject: split and extraction Hi there I want to extract some word after space from some string. Somebody from the mailing list had given me

split and extraction

2002-01-30 Thread Dhiraj P Nilange
Hi there I want to extract some word after space from some string. Somebody from the mailing list had given me above command. suppose I wanto extract 8th word... #suppose $abc has the string; $abc=split[/\s+/]->[8]; #somebody told me like this. but it doesnt work. if i use some array in th