- Original Message -
From: "Chris Wagner" <[EMAIL PROTECTED]>
To:
Sent: Sunday, December 18, 2005 9:26 AM
Subject: Re: Sort question
> I'm a little amazed this works but it does. :)
>
> @nums = qw(55_20051202 56_20051203 57_20051204 101_20051205 59_2005
I'm a little amazed this works but it does. :)
@nums = qw(55_20051202 56_20051203 57_20051204 101_20051205 59_20051206
10_20051207 61_20051208 62_20051208 63_20051208 64_20051209 65_20051209
66_20051210 67_20051211 68_20051212 69_20051213 70_20051214);
print join "\n", (map {join "_", @{$_}} (sort
- Original Message -
From: "Wong, Danny H." <[EMAIL PROTECTED]>
To:
Sent: Saturday, December 17, 2005 7:04 AM
Subject: Sort question
> Hi Guys,
> I have an array of values. How can I sort these values that has
> a non numeric character [ _ ] in it? What I
I have an array of values. How can I sort these values that has
a non numeric character [ _ ] in it? What I did was parse the numbers
before the "_" character and then perform a number short on those
value, but there must be an easier way? Any help is greatly
appreciated.
55_20051202
On 12/16/05, Wong, Danny H. <[EMAIL PROTECTED]> wrote:> Hi Guys,> I
have an array of values. How can I sort these values that has> a non numeric
character [ _ ] in it? What I did was parse the numbers> before the "_"
character and then perform a number short on those value,> but there mu
[EMAIL PROTECTED] wrote:
> Hi Guys,
> I have an array of values. How can I sort these values that has
> a non numeric character [ _ ] in it? What I did was parse the numbers
> before the "_" character and then perform a number short on those
> value, but there must be an easier way? Any help
Hi Guys,
I have an array of values. How can I sort these values that has
a non numeric character [ _ ] in it? What I did was parse the numbers
before the "_" character and then perform a number short on those value,
but there must be an easier way? Any help is greatly appreciated.
55_20051
"$Bill Luebkert" wrote:
> Michael Meltzer wrote:
>
> > The following strings I have in an array:
> >
> > xyz
> > abcd
> > ZABC
> >
> > if I do @sorted = sort(@unsorted) I get
> >
> > ZABC
> > abcd
> > xyz
> >
> > I would like to sort this strings alphabetical ignoring capitalisation but
> > whith
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Michael Meltzer
> Sent: Wednesday, December 15, 2004 2:44 PM
> To: Perl-Win32-Users
> Subject: sort question
>
> The following strings I have in a
Michael Meltzer wrote:
> The following strings I have in an array:
>
> xyz
> abcd
> ZABC
>
> if I do @sorted = sort(@unsorted) I get
>
> ZABC
> abcd
> xyz
>
> I would like to sort this strings alphabetical ignoring capitalisation but
> whithout changing the output format.
> I want to get this
-Users
Subject: sort question
The following strings I have in an array:
xyz
abcd
ZABC
if I do @sorted = sort(@unsorted) I get
ZABC
abcd
xyz
I would like to sort this strings alphabetical ignoring capitalisation but
whithout changing the output format.
I want to get this:
abcd
xyz
ZABC
How can
The following strings I have in an array:
xyz
abcd
ZABC
if I do @sorted = sort(@unsorted) I get
ZABC
abcd
xyz
I would like to sort this strings alphabetical ignoring capitalisation but
whithout changing the output format.
I want to get this:
abcd
xyz
ZABC
How can I do this ?
Michael
--
+--
Thursday, January 03, 2002 11:32
> To: Perl-Win32-Users Mailing List (E-mail)
> Subject: sort question
>
>
> This is probably really easy but I couldn't find it in the
> docs. I have a
> multicolumn list that has between 5000-6000 lines and looks
> something like
>
> -Original Message-
> Behalf Of Peter Eisengrein
>
> This is probably really easy but I couldn't find it in the docs. I have a
> multicolumn list that has between 5000-6000 lines and looks something like
> this:
>
> 47 3950 0 Y Y N N OOSM
Just parse each line ($a and $b) within your sort subroutine, e.g.:
#!/usr/bin/perl
sub sorter {
my (@a,@b);
@a = split(/\s+/,$a);
@b = split(/\s+/,$b);
@a[1] <=> @b[1];
}
@lines = <>;
print sort sorter @lines;
-Jonathan
At 11:32 AM 1/3/2002, Peter Eisengrein wrote:
>This is probab
.
HTH,
Ricky
-Original Message-
From: Peter Eisengrein [mailto:[EMAIL PROTECTED]]
Sent: Thursday 03 January 2002 11:32 AM
To: Perl-Win32-Users Mailing List (E-mail)
Subject: sort question
This is probably really easy but I couldn't find it in the docs. I have a
multicolumn list that
This is probably really easy but I couldn't find it in the docs. I have a
multicolumn list that has between 5000-6000 lines and looks something like
this:
47 3950 0 Y Y N N OOSM
70 1131 1 N Y N N LKD
17 matches
Mail list logo