In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Wendy Stewart) writes:
>Hi,
>
>Help!!   I'm a new Perl user and have devloped my first Perl script to
>extract fields from a Remedy form into a CSV file to be ftp'd elsewhere.  I
>need to sort each record on Modified-date before writing to my output file.
>The Modified-date format is in absolute time
>(ie:  12/24/2002 7:17:13 PM).  Here's a partial extract of my script:
>
># The criteria is supposed to included everything modified in the past 1
>hour
># which equates to the current time - (60 seconds * 60 minutes).
>
>$SelectQualifier = (ars_LoadQualifier($ctrl, "$SCHEMA", "('Modified-date'
>>=(\$TIMESTAMP\$ - 60*60) OR 'Create-date' >= (\$TIMESTAMP
>\$ - 60*60))
>
>%entries = ars_GetListEntry($ctrl, "$SCHEMA", $SelectQualifier, 0);

You can do the sorting right there.  See
http://search.cpan.org/src/JMURPHY/ARSperl-1.74/html/manual/ars_GetListEntry.html.

I would recommend you also look at the O-O interface:

http://search.cpan.org/src/JMURPHY/ARSperl-1.74/html/manual/OO/form.html

It's a lot easier to use.  I haven't actually done sorting in queries there,
but you'd use setSort() to define the sorting order and then query() to get
the results in that order.

N.B. For a "new" Perl user, this is pretty advanced stuff.  *Make sure* you
get some instruction or education in plenty of Perl basics or you are going
to end up with significant holes in your knowledge.

-- 
Peter Scott
http://www.perldebugged.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to