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
> 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
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
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
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