GD Graphs

2002-12-12 Thread Mike(mickako)Blezien
Hello,

I am going to be working on a project, that will be utilizing the GD::Graphs 
module to create various graph reports. I was hoping that someone could point me 
to some good documentation or working examples of the uses of this module... of 
course I've been to CPAN, but was hoping to find more working examples of it's use.

If you've used this module, would appreciate if you can direct me to some good 
docs and examples,... or if some one can recomend a better method of creating 
and working with graphs and Perl.

TIA as always

Happy Holidays,

--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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



Re: GD Graphs

2002-12-12 Thread Mike(mickako)Blezien
Ok, thanks, I will check it out. ;)

 [EMAIL PROTECTED] wrote:

O'Reilly offers two books (or they claim the second as of Dec) on this subject that you might want to look into, I have not read/seen either so cannot provide a review sorry.

http://www.oreilly.com/catalog/prowg/
http://www.oreilly.com/catalog/perlgp/ (December)

http://danconia.org


On Thu, 12 Dec 2002 09:39:41 -0600, Mike(mickako)Blezien [EMAIL PROTECTED] wrote:



Hello,

I am going to be working on a project, that will be utilizing the GD::Graphs 
module to create various graph reports. I was hoping that someone could point me 
to some good documentation or working examples of the uses of this module... of 
course I've been to CPAN, but was hoping to find more working examples of it's use.

If you've used this module, would appreciate if you can direct me to some good 
docs and examples,... or if some one can recomend a better method of creating 
and working with graphs and Perl.


--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




Retrieving POP email

2002-12-02 Thread Mike(mickako)Blezien
Hello all,

I am currently working on retrieving a POP account that will have some stock 
quota data in it for clients and sent out several times aday. I am using the use 
Mail::POP3Client module. All is working fine, except I need to strip out all but 
the body of the message, removing all the mail header data as this is not 
needed. Below is a sample of the test script and a sample of one of the emails 
retrieved from this POP account.

# TEST SCRIPT:
# ===
#!/usr/local/bin/perl
BEGIN { open (STDERR,./mailpop_error.log); }
use CGI::Carp qw(fatalsToBrowser);
use CGI qw/:standard/;
use Mail::POP3Client;
use strict;

print header('text/plain');

my $pop = new Mail::POP3Client('USER'  = 'account_username',
   'PASSWORD'  = 'account_pass',
   'HOST'  = 'domain_name.com',
   'TIMEOUT'   = '60',
			   'AUTH_MODE' = 'BEST',
		   'PORT'  = '110'
   );

 $pop-Alive() or die POP3 connection doesn't work.;
 my $count = $pop-Count();
  if ($count  0) {
 my @mails = ();
  for(my $i = 1; $i = $count; $i++ ) {
$mails[$i] = $pop-Retrieve($i);
print $mails[$i]\n;
   # $pop-Delete($i);
 }
 $pop-Close();
 }
print \nPOP process completed. Total Emails: $count\n;
exit();
# END OF SCRIPT
# ===

A Sample email received. Need to strip all the email mail header data so I end 
up with just the body of the message.

#START OF MESSAGE
# 
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 03 Sep 2002 13:24:53 -0400
Received: from hall.mail.mindspring.net ([207.69.200.60])
	by justlightening.justlightening.net with esmtp (Exim 3.35 #1)
	id 17mHQ5-0008Vk-00
	for [EMAIL PROTECTED]; Tue, 03 Sep 2002 13:24:53 -0400
Received: from user-119aek4.biz.mindspring.com ([66.149.58.132] helo=dbc.com)
	by hall.mail.mindspring.net with smtp (Exim 3.33 #1)
	id 17mHQl-0005Fo-00
	for [EMAIL PROTECTED]; Tue, 03 Sep 2002 13:25:35 -0400
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: IBM last trade at 73.20
Message-Id: [EMAIL PROTECTED]
Date: Tue, 03 Sep 2002 13:25:35 -0400
Status: R
# BODY OF MESSAGE ONLY NEEDED
IBM Limit (73.20) Downside on Tue Sep 03 13:25:34
IBM sell signal.  Add IBM Sep$75 Puts (IBM UO)


# END OF SAMPLE EMAIL MESSAGE
# ===
what is the best way to obtain just the body of the email message?

TIA
--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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



Re: Retrieving POP email

2002-12-02 Thread Mike(mickako)Blezien
Hi Wiggins,

Thanks for the info. I was sure that the Mail::POP3Client had something in it to 
extract the body of the message, but haven't been able to get it to work with 
the test script belowdo you possible have an example of sample script that 
may do this ??

TIA

Wiggins d'Anconia wrote:
Mail::POP3Client has a built in method to do this, from the docs:

Body( MESSAGE_NUMBER )
Get the body of the specified message, either as an array of lines 
or as a string, depending on context.

If for some reason you must do it yourself, the end of the mail headers 
are indicated by the first blank line following the start of the 
message. So you can step through the message until you get to the first 
blank line, for instance $line =~ /^$/ and assume everything in that 
message after is the body of the message.

You may also want to check other modules on CPAN as there are a number 
that handle the parsing of mail messages.

http://search.cpan.org/author/SDOWD/POP3Client-2.12/POP3Client.pm

http://danconia.org

Mike(mickako)Blezien wrote:

Hello all,

I am currently working on retrieving a POP account that will have some 
stock quota data in it for clients and sent out several times aday. I 
am using the use Mail::POP3Client module. All is working fine, except 
I need to strip out all but the body of the message, removing all the 
mail header data as this is not needed. Below is a sample of the test 
script and a sample of one of the emails retrieved from this POP account.

# TEST SCRIPT:
# ===
#!/usr/local/bin/perl
BEGIN { open (STDERR,./mailpop_error.log); }
use CGI::Carp qw(fatalsToBrowser);
use CGI qw/:standard/;
use Mail::POP3Client;
use strict;

print header('text/plain');

my $pop = new Mail::POP3Client('USER'  = 'account_username',
   'PASSWORD'  = 'account_pass',
   'HOST'  = 'domain_name.com',
   'TIMEOUT'   = '60',
   'AUTH_MODE' = 'BEST',
   'PORT'  = '110'
   );

 $pop-Alive() or die POP3 connection doesn't work.;
 my $count = $pop-Count();
  if ($count  0) {
 my @mails = ();
  for(my $i = 1; $i = $count; $i++ ) {
$mails[$i] = $pop-Retrieve($i);
print $mails[$i]\n;
   # $pop-Delete($i);
 }
 $pop-Close();
 }
print \nPOP process completed. Total Emails: $count\n;
exit();
# END OF SCRIPT
# ===

A Sample email received. Need to strip all the email mail header data 
so I end up with just the body of the message.

#START OF MESSAGE
# 
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 03 Sep 2002 13:24:53 -0400
Received: from hall.mail.mindspring.net ([207.69.200.60])
by justlightening.justlightening.net with esmtp (Exim 3.35 #1)
id 17mHQ5-0008Vk-00
for [EMAIL PROTECTED]; Tue, 03 Sep 2002 13:24:53 -0400
Received: from user-119aek4.biz.mindspring.com ([66.149.58.132] 
helo=dbc.com)
by hall.mail.mindspring.net with smtp (Exim 3.33 #1)
id 17mHQl-0005Fo-00
for [EMAIL PROTECTED]; Tue, 03 Sep 2002 13:25:35 -0400
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: IBM last trade at 73.20
Message-Id: [EMAIL PROTECTED]
Date: Tue, 03 Sep 2002 13:25:35 -0400
Status: R
# BODY OF MESSAGE ONLY NEEDED
IBM Limit (73.20) Downside on Tue Sep 03 13:25:34
IBM sell signal.  Add IBM Sep$75 Puts (IBM UO)


# END OF SAMPLE EMAIL MESSAGE
# ===
what is the best way to obtain just the body of the email message?

TIA







--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




Re: Retrieving POP email

2002-12-02 Thread Mike(mickako)Blezien
Ok, I see where I was going wrong, forgot to add the (MESSAGE_NUMBER) in the 
Body() while looping thru each email!

thanks for all your help ;) Works fine now

Happy Holidays

Wiggins d'Anconia wrote:
Haven't used the module myself, but see inline.

Mike(mickako)Blezien wrote:


Hi Wiggins,

Thanks for the info. I was sure that the Mail::POP3Client had 
something in it to extract the body of the message, but haven't been 
able to get it to work with the test script belowdo you possible 
have an example of sample script that may do this ??


snip


  for(my $i = 1; $i = $count; $i++ ) {
$mails[$i] = $pop-Retrieve($i);




my @message_body = $pop-Body($i);
print @message_body;

Should do the same as you were doing before. @message_body should 
contain what you want.

print $mails[$i]\n;
   # $pop-Delete($i);
 }




snip

If it doesn't, do you get an error? Or can you provide more info?

http://danconia.org






--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




multiple selection

2002-11-22 Thread Mike(mickako)Blezien
Hello all,

having a problem with processing multiple selection from a scrolling list... 
first time working with tha scrolling list. Here is the test script I'm working 
with:
#!/usr/local/bin/perl
use CGI qw(:standard);

$action = param('action');

print header();
print start_html();
 if (!$action) {
print start_html();
print qq~
form method=POST action=/mailer/cgi/list.pl
input type=hidden name=action value=doit
font face=arial size=2BSelect List:/BP
~;
print scrolling_list(-name='list',
 -value=['List_1','List_2','List_3'],
 -default=['List_1'],
 -multiple=1);
print qq~
input type=submit value=Submit/form
~;
print end_html();
  } else {
  @lists = split(/ /,param('list'));
print qq|Total: @lists|;
  }

exit();

Now I thought that the @list array would store all the selected values from the 
list... but it doesn't, just one, even if all the items have been selected from 
the list... what am I missing here ??

thanks
--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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



Convert IP address

2002-11-11 Thread Mike(mickako)Blezien
Hello,

was wondering if there is a module or someone may know of a quick means of 
convering a IP address to a host/domain address.

this is a snip of code we use to use, but I don't think it works very well any more:

# Covert Host IP Address to domain name IE: [somedomain.com]
 $ip = remote_addr();
 $n = `nslookup -sil $ip | grep Name`; chomp($n);
 $dns_host=substr($n, rindex($n,  )+1);
 $period1=rindex($dns_host,'.');
 $period2=rindex($dns_host,'.',$period1-1);
 $domain_host = substr($dns_host,$period2+1);
 # Now split secondary domain to top level domain
  ($sec_domain, $top_domain) = split(/\./, $domain_host);

then we could obtain the secondary and top domain names... any other suggestions 
would be much appreciated. :)

TIA,
--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
MSN: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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



Removing Folder/Files

2002-10-06 Thread Mike(mickako)Blezien

Hello,

there was a dicussion earlier on this list about a module that removes folder 
and files similar to the `rm -rf` command line, but for the life of can't 
remember which modules does this, with some thing like rmtree().

thanks,
-- 
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




Monitor a POP3 account

2002-09-03 Thread Mike(mickako)Blezien

Hello All,

Need to come up with a script to monitor a special POP3 account that will be
used to tigger another script.. was hoping someone could direct me or supply an
example of how to retreive an email from a POP account.

Basically this will automatically monitor the POP account via a cron job,.. no
problems there, but what is the best way to retrieve the email, via Perl, so the
other script can be triggered... hope this is clear ;)

thanks, 
-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel:  1(985)902-8484
Fax:  1(985)345-2419
MSN Messager Contact: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




Open new window.

2002-08-26 Thread Mike(mickako)Blezien

Hello all,

this maybe bit off topic, but was hoping someone may have some suggestions.

I have simple form that a person makes a selection from a drop box and we would
like to open a new window, and resize it similar to using javascript(pop-up
window), but can't really use javascript, because we need to do some simple math
calculation, which would be produced in the new window that's opened, and would
rather not open a full browser new window if at all possible,... and I haven't
seen any js scripts that does this.

was hoping someone may have done this with perl..

thanks,

-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Bus Phone:  1(985)902-8484
MSN Message Contact: [EMAIL PROTECTED]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




Re: database update

2002-08-15 Thread Mike(mickako)Blezien

Rob wrote:
 
 The following line works from a script run from the command line on the
 server...
 
 $sql = UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes'
 WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and
 Serial = '$serial';
 
 but when run from cgi I get the following error...
 
 ERROR: parser: parse error at or near ,
 
 I'm using the Pg module, any idea why it won't run from the web?

Try single or double quotes around your varilables, IE.. CustNo = '$custNo', PIN
= '$pin'
or read up on placeholders.
-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Bus Phone:  1(985)902-8484
Cellular:   1(985)320-1191
Fax:1(985)345-2419
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




Re: mysql problem

2002-08-15 Thread Mike(mickako)Blezien

Jim Lundeen wrote:
 ok, i just setup a new server (redhat 7.3) and my guy says that the
 dbd/dbi stuff is configured for perl-to-mysql connectivity, but i get
 the following error message in my error log each time i try to run a
 script from either the command line or via the browser:
 
 ---
 install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
 contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1
 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1
 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl
 /usr/lib/perl5/vendor_perl/5.6.1/i386-linux
 /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl .) at (eval
 3) line 3.
 Perhaps the DBD::mysql perl module hasn't been fully installed,
 or perhaps the capitalisation of 'mysql' isn't right.
 Available drivers: ExampleP, Pg, Proxy.
  at /home/domaincentric/mcp/www/menu.cgi line 13

Make sure the DBD::mysql module is also installed. The DBI is the API that uses
the DBD::mysql drives.
-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Bus Phone:  1(985)902-8484
Cellular:   1(985)320-1191
Fax:1(985)345-2419
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




Better regrex method

2002-08-14 Thread Mike(mickako)Blezien

Hello,

I'm working on a project where I need to split various tag numbers, from a
standard set of prefixes, entered into a form and check the number against a
database.

A sample test code that works, but was wondering if there's a better way to
utilize the regrex of this code:

# @tags similuate the tag numbers entered into a form, multiple numbers
my @tags = qw(K001900 L001234 GP001675);

# @prefixs are a pre-determined set of prefixes used.
my @prefixs = qw(SP 8 L K GP TP MP);

my($tagid,$tnum);

print header('text/html');
  while(my $prefix = @prefixs) {
  foreach $tagid (@tags) {
   if ($tagid =~ m!^$prefix!) {
 $tagid =~ s!^$prefix!!;
 print qq|Prefix: $prefix - Number: $tagidbr|;
 # Results: Prefix: K - Number: 001900
 # ...etc
}
  }
}

My questions is, is there a better way to separate the prefix from the number ??
Any suggest would be much appreciated.

TIA,
-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Bus Phone:  1(985)902-8484
Cellular:   1(985)320-1191
Fax:1(985)345-2419
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




Re: Better regrex method

2002-08-14 Thread Mike(mickako)Blezien

Hi Rob,

Yea, I think that would work better, much appreciated ;)

Hanson, Rob wrote:
 
 This works for me...
 
 # sample data
 my @tags = qw(K001900 L001234 GP001675);
 my @prefixs = qw(SP 8 L K GP TP MP);
 
 # join them with pipes for use in the regex
 my $prefix = join('|', @prefixs);
 
 # match prefix against each tag, seprate the parts.
 # the o switch cause the regex to only compile once.
 # the split tags go back into the @tag array.
 my @tags = map {/^($prefix)(.*)$/o;{PRE=$1,NUM=$2}} (@tags);
 
 # this print out the prefix/number pairs
 foreach my $tag (@tags) {
 print PREFIX: , $tag-{PRE}, \n;
 print NUMBER: , $tag-{NUM}, \n;
 print \n;
 }
 
 Something like that?
 


 
 -Original Message-
 From: Mike(mickako)Blezien [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 14, 2002 2:44 PM
 To: Perl List
 Subject: Better regrex method
 
 Hello,
 
 I'm working on a project where I need to split various tag numbers, from a
 standard set of prefixes, entered into a form and check the number against a
 database.
 
 A sample test code that works, but was wondering if there's a better way to
 utilize the regrex of this code:
 
 # @tags similuate the tag numbers entered into a form, multiple numbers
 my @tags = qw(K001900 L001234 GP001675);
 
 # @prefixs are a pre-determined set of prefixes used.
 my @prefixs = qw(SP 8 L K GP TP MP);
 
 my($tagid,$tnum);
 
 print header('text/html');
   while(my $prefix = @prefixs) {
   foreach $tagid (@tags) {
if ($tagid =~ m!^$prefix!) {
  $tagid =~ s!^$prefix!!;
  print qq|Prefix: $prefix - Number: $tagidbr|;
  # Results: Prefix: K - Number: 001900
  # ...etc
 }
   }
 }
 
 My questions is, is there a better way to separate the prefix from the
 number ??
 Any suggest would be much appreciated.
 
 TIA,



-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Bus Phone:  1(985)902-8484
Cellular:   1(985)320-1191
Fax:1(985)345-2419
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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




Reformatting a file

2002-08-10 Thread Mike(mickako)Blezien

Hello all,

I'm trying to correct some shopping cart files that got messed up and need to be
reformatted, so we can rebuild the database from these text order files. This is
a sample of some of the data:

order_items::PF110::189.95::0.00::89.95::
^^GG111::149.95::0.00::49.95::

order_items::GU402::2::Necklace Color
Black::29.95::0.00::59.90::
^^TUE100::195.00::0.00::95.00::
^^GG111::149.95::0.00::49.95::
^^LM305::112.95::0.00::12.95::
^^CO303::124.95::0.00::24.95::

order_items::GU402::2::Necklace Color
Black::29.95::0.00::59.90::
^^AN401::164.95::0.00::64.95::
^^GU407::129.95::0.00::29.95::
^^PF110::189.95::0.00::89.95::

Now each of these order_items lines, I need to grab the lines from the file,
IE:
order_items::PF110::189.95::0.00::89.95::
^^GG111::149.95::0.00::49.95::

then put it all on one line, IE:
order_items::PF110::189.95::0.00::89.95::^^GG111::149.95::0.00::49.95:

Here is what the entire order file looks like:

invuserid::[EMAIL PROTECTED]
address1:: Princewood Dr.
address2::
city::AnyWhere
state::WI
zip::12345
country::US
firstname::John
lastname::Doe
midname::D.
phone::1.555.1212.
hphone::
nphone::
fax::
shaddress1:: Princewood Dr.
shaddress2::
shcity::AnyWhere
shstate::WI
shzip::12345
shcountry::US
shfirstname::John
shlastname::Doe
shmidname::D.
total_weight::2.54
invno::1023467192204
invdate::6/7/2002
tot_price::289.75
tot_discount::57.95
tax_total::0.00
vat_tax::0.00
shipping_total::8.00
tot_item_shipping::0
grand_total::239.80
order_items::TUE100::195.00::0.00::95.00::
^^PF109::159.95::0.00::59.95::
^^LGP107::159.95::0.00::59.95::
^^QM201::124.95::0.00::24.95::
^^EN200::124.95::0.00::24.95::
^^CO303::124.95::0.00::24.95::


Any suggestion/help on the best way to do this, and would be appreciated.

TIA,
-- 
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Bus Phone:  1(985)902-8484
Cellular:   1(985)320-1191
Fax:1(985)345-2419
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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