On Fri, 17 Jun 2016 14:33:12 -0700
Kenneth Wolcott wrote:
> Hi;
>
> I'm having trouble understanding the built-in Perl sort with regards
> to mixed numbers and strings
>
> I'm looking at http://perldoc.perl.org/functions/sort.html
>
> I have a
compare" routine uses $a and $b which are "special" to perl
>> sort routines.
>> Also the compare routine is written for obviousness rather than for brevity
>> or elegance.
>>
>> The return from compare illustrates Shalomi Fish's point about usi
Hi Chris,
On Mon, 20 Jun 2016 11:28:57 -0600
Chris Fedde wrote:
> Kenneth,
>
> Below the cut is my example implementation as I understand your
> requirements.
> Note that the "compare" routine uses $a and $b which are "special" to perl
> sort routines.
>
Kenneth,
Below the cut is my example implementation as I understand your
requirements.
Note that the "compare" routine uses $a and $b which are "special" to perl
sort routines.
Also the compare routine is written for obviousness rather than for brevity
or elegance.
The
Hi Kenneth,
On Fri, 17 Jun 2016 14:41:41 -0700
Kenneth Wolcott wrote:
> On Fri, Jun 17, 2016 at 2:33 PM, Kenneth Wolcott
> wrote:
> > Hi;
> >
> > I'm having trouble understanding the built-in Perl sort with regards
> > to mixed numbers and st
In this very particular case you should consider turning off the warning,
maybe limiting it to the block.
On Jun 17, 2016 5:42 PM, "Kenneth Wolcott" wrote:
> On Fri, Jun 17, 2016 at 2:33 PM, Kenneth Wolcott
> wrote:
> > Hi;
> >
> > I'm having trouble un
Wolcott wrote:
>
> On Fri, Jun 17, 2016 at 2:33 PM, Kenneth Wolcott
> wrote:
>> Hi;
>>
>> I'm having trouble understanding the built-in Perl sort with regards
>> to mixed numbers and strings
>>
>> I'm looking at http://perldoc.perl.org/
On Fri, Jun 17, 2016 at 2:33 PM, Kenneth Wolcott
wrote:
> Hi;
>
> I'm having trouble understanding the built-in Perl sort with regards
> to mixed numbers and strings
>
> I'm looking at http://perldoc.perl.org/functions/sort.html
>
> I have an array that I w
Hi;
I'm having trouble understanding the built-in Perl sort with regards
to mixed numbers and strings
I'm looking at http://perldoc.perl.org/functions/sort.html
I have an array that I want to have sorted numerically and descending.
The array is composed of elements that loo
g to a number using a thing from Scalar::Util.
References:
http://perlmaven.com/argument-isnt-numeric-in-numeric
http://perlmaven.com/automatic-value-conversion-or-casting-in-perl
--Brock
On Tue, Mar 8, 2016 at 4:29 PM, Kenneth Wolcott
wrote:
> Hi;
>
> How do I call the built-in Perl so
On Tue, 8 Mar 2016 13:29:40 -0800
Kenneth Wolcott wrote:
> How do I call the built-in Perl sort function on an array of strings
> where the string is composed of one or more digits, followed by a tab
> which is followed by a string and I want the results to be sorted in
> reverse n
> Hi;
>
> How do I call the built-in Perl sort function on an array of strings
> where the string is composed of one or more digits, followed by a tab
> which is followed by a string and I want the results to be sorted in
> reverse numeric order?
>
> I looked at http
Hi;
How do I call the built-in Perl sort function on an array of strings
where the string is composed of one or more digits, followed by a tab
which is followed by a string and I want the results to be sorted in
reverse numeric order?
I looked at http://perldoc.perl.org/functions/sort.html
Hi all,
Chas. Owens wrote:
Well, I would suggest taking this to the Perl Porters list*, this is a
list for people who are starting to learn Perl. You could also write
a module implementing you algorithm either in pure Perl or in XS**
(the interface between ISO C and Perl) and upload it to CPAN
On Sat, Feb 7, 2009 at 22:41, Marion McCoskey wrote:
> I am a retired programmer, and I haven't had a lot of trouble with the
> couple of thousand lines of Perl I have written, except remembering to
> always put in curly braces. But I don't know anything about the Perl
> community.
>
> While look
Hi Marion,
Marion McCoskey wrote:
While looking at the documentation for the sort function, I noticed it
complaining about the shortcomings of the quick sort. I share that
feeling and I have developed a single-buffered count sort that is
faster than the quick sort and a lot more stable.
Act
I am a retired programmer, and I haven't had a lot of trouble with the
couple of thousand lines of Perl I have written, except remembering to
always put in curly braces. But I don't know anything about the Perl
community.
While looking at the documentation for the sort function, I noticed it
comp
pauld wrote:
John W. Krahn wrote:
It sorts fine here:
$ perl -le'
print for @x = qw/200610011733 200610012057 200610011029 200610010928 200610011220/,
"";
print for sort @x;
'
200610011733
200610012057
200610011029
200610010928
200610011220
200610010928
200610011029
200610011220
2006100117
> $ perl -le'
> print for @x = qw/200610011733 200610012057 200610011029 200610010928
> 200610011220/, "";
>
> print for sort @x;
> '
> 200610011733
> 200610012057
> 200610011029
> 200610010928
> 200610011220
>
the time is the last 4 digits (hhmm)
so the first is 17:33
then 20:57
then 10:29
then
pauld wrote:
I want to sort a hash of hash by date&time and then extract some of
the data.
From the data ive got i can contruct a key that is mmddhhmm
and i do this
##error trap absent entries
if ($endan=~m/\d{2}:\d{2}\s+\d{2}/ && $stan=~m/\d{2}:\d{2}\s+\d{2}/ )
{my %daylist;
#
I want to sort a hash of hash by date&time and then extract some of
the data.
>From the data ive got i can contruct a key that is mmddhhmm
and i do this
##error trap absent entries
if ($endan=~m/\d{2}:\d{2}\s+\d{2}/ && $stan=~m/\d{2}:\d{2}\s+\d{2}/ )
{my %daylist;
##split start and
21 matches
Mail list logo