## Re: [PBML] sorting of array

Expand Messages
• Yes, 4th column of each array element is number. anguilla1969@comcast.net wrote: Mirza, Is the number always in the 4th column of each array element or are we
Message 1 of 5 , Mar 31, 2006
• 0 Attachment
Yes, 4th column of each array element is number.

anguilla1969@... wrote: Mirza,

Is the number always in the 4th column of each array element or are we assuming you may have more numbers for each unique element.

- Sean

-------------- Original message --------------
From: "Mirza Abdullah Jan" <jan576pk@...>
HI all

suppose any array contains following element as shown.

\$sortarr[0] = a b f 2 x y z
\$sortarr[1] = a b h 5 x y z
\$sortarr[2] = a b x 8 x y z
\$sortarr[3] = a b p 6 x y z
\$sortarr[4] = a b q 3 x y z

i want to sort the array through numeric values (same positoin as
hown aoble) .The output should be like this

\$sortarr[0] = a b x 8 x y z
\$sortarr[1] = a b p 6 x y z
\$sortarr[2] = a b h 5 x y z
\$sortarr[3] = a b q 3 x y z
\$sortarr[4] = a b f 2 x y z

when i use sort function , perl simply sort from first character of
the line.
I want to sort the lines through my choice character(any where in
the line).

Thanks

Mirza Abdullah Jan

Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html

Visit your group "perl-beginner" on the web.

To unsubscribe from this group, send an email to:
perl-beginner-unsubscribe@yahoogroups.com

[Non-text portions of this message have been removed]

Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html

Basic programming language C programming language Computer programming languages The c programming language C++ programming language List of programming languages

---------------------------------

Visit your group "perl-beginner" on the web.

To unsubscribe from this group, send an email to:
perl-beginner-unsubscribe@yahoogroups.com