Wardy... Turns out it wasn't working at all. :(
I'm going to try it a different way and perhaps start a new thread, one without all the long-winded code, etc. :)
Thanks,
Pete
I have a script that writes to .txt files. This script has worked forever...
All of a sudden it no longer will write to files.
It will CREATE the filename, but will not open and write to it.
I've checked permissions, and the actual doesn't crash -- it simply will not write...
Thanks for the reply kevin,
I saw your code, however it is a sub that I would need to call... I don't know where I am suppose to call it and that is what I needed help with.
Sorry if I offended you.
Thanks guys I was wayyyyyy too tired last night. I have a clearer picture of things now!... and a slight change. We want to sort by PRICE, NOT item #. So in the db below, it is the third field (in this example |4.95|)
If there is another file you need that this file calls... PLEASE let me...
wardy,
The more I look at it, the more it looks like the code:
foreach $row (@database_rows)
{
chomp $row;
@tmp = split (/\|/,$row);
$tmp_row = "$tmp[$sc_db_index_for_sort]\|$row";
push (@rows_to_sort,"$tmp_row\n");
}
@sorted_rows = sort(@rows_to_sort);
@database_rows = ();
foreach...
Ok... Here is what I got so far,
This is VERY freaky... it works, but not for everything. For example. On some results it DOES sort by product id (which in this case is done in the defining of $sc_db_index_for_sort as: $db{"product_id"}
On others the sort "jumps around" is there something...
What got me started on this is this code:
(He sorted by date, which is not what I want, I want to sort by the first field in the db, which is the item number.)
Don't know if this helps... but I'm lost:
Hi guys just added a new functionality to the web_store script That I thought you might...
I have a long sub. that is *very* sloppy and I need to have it sort by the variable $item_id which is the first field in the flat file db that this sub get's its information from. If I am not making sense, please don't beat me up too bad... I don't know exactly what I'm talking about. I know...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.