CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
need help for filtering data of file

 



mojo
New User

Aug 24, 2012, 12:13 AM

Post #1 of 4 (3868 views)
need help for filtering data of file Can't Post

I am getting huge data in the form of a table from database. first column containd unique ID and third column contains some other id. this data is stored in a file
now I want to arrange this data based on the first column id (unique id). Is there any in built library or module that can help

Thanks in advance


BillKSmith
Veteran

Aug 24, 2012, 9:12 AM

Post #2 of 4 (3835 views)
Re: [mojo] need help for filtering data of file [In reply to] Can't Post

Refer to the section on Schwartzian Transform in the FAQ perldoc -q sort
Good Luck,
Bill


Laurent_R
Veteran / Moderator

Aug 25, 2012, 2:17 AM

Post #3 of 4 (3817 views)
Re: [mojo] need help for filtering data of file [In reply to] Can't Post

I understand that you want to sort the data according to the first column, which contains unique IDs. A simple sort (the default ASCIIbetical sort) should do it, without the need of a Schwarzian Transform.


BillKSmith
Veteran

Aug 25, 2012, 7:57 AM

Post #4 of 4 (3806 views)
Re: [Laurent_R] need help for filtering data of file [In reply to] Can't Post

True, but the OP specified "huge data". Depending on how the database table is organized in perl, the transform could be much faster.
Good Luck,
Bill

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives