Re: Attachment in Excel format?

2011-02-24 Thread David Newman
On 2/6/11 10:45 PM, Octavian Rasnita wrote: Is there some other means of creating an Excel file using perl? thanks Create a real Excel file using Spreadsheet::WriteExcel. Thanks, this worked fine. I did make the rookie mistake of copying an example off the web without fully

Attachment in Excel format?

2011-02-06 Thread David Newman
Greetings. I'm looking for a way to run a query against a SQL database, save the result into a file, and then attach the file to an email. The DBD::mysql and MIME::Lite modules handle the SQL query and email attachment respectively, but at least with the MIME 'text/csv' format there's a problem:

Re: Attachment in Excel format?

2011-02-06 Thread David Newman
-Disposition: attachment; filename=filename.csv Content-Transfer-Encoding: 8bit Content-Type: text/csv; name=filename.csv Regards. Sun, 06 Feb 2011 15:38:44 -0800 письмо от David Newman dnew...@networktest.com: Greetings. I'm looking for a way to run a query against a SQL database, save

Re: Attachment in Excel format?

2011-02-06 Thread David Newman
On 2/6/11 7:57 PM, terry peng wrote: Sun, 06 Feb 2011 18:18:09 -0800 письмо от David Newman dnew...@networktest.com: This is a multi-part message in MIME format. --_--=_1297044547631150 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain

Re: inverting List::Compare

2009-01-03 Thread David Newman
On 1/2/09 5:22 PM, Rob Dixon wrote: David Newman wrote: Greetings. I have a working script (pasted below) that uses List::Compare to find common lines in two files. Now I am again looking to compare two files but this time exclude any lines in file 1 that appear in file 2. I don't see

inverting List::Compare

2009-01-02 Thread David Newman
Greetings. I have a working script (pasted below) that uses List::Compare to find common lines in two files. Now I am again looking to compare two files but this time exclude any lines in file 1 that appear in file 2. I don't see anything in the List::Compare documentation on how to do this.

Re: slightly OT -- launching script in iTerm.app or Terminal.app

2008-08-04 Thread David Newman
On 8/4/08 4:09 AM, Rodrick Brown wrote: On Mon, Aug 4, 2008 at 12:33 AM, David Newman [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: How to launch a perl script when starting iTerm.app or Terminal.app in OS X? Thanks in advance and apologies for the slightly OT post. dn

slightly OT -- launching script in iTerm.app or Terminal.app

2008-08-03 Thread David Newman
How to launch a perl script when starting iTerm.app or Terminal.app in OS X? Thanks in advance and apologies for the slightly OT post. dn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Data::Table error

2008-05-28 Thread David Newman
and Excel and see no column 83 or 84 anywhere. Thanks for any clues on what might be causing this error. dn On 5/26/08 8:33 PM, David Newman wrote: I'm using Data::Table to compare two lists of contacts, both in CSV form. Running the script below produces this error: /Library/Perl/5.8.8/Data

Re: parsing CSV files with control and extended ASCII characters

2008-05-06 Thread David Newman
On 3/20/08 5:05 PM, Gunnar Hjalmarsson wrote: David Newman wrote: I have some CSV input files that contain control and extended ASCII characters, snip The Text::CSV or Tie::Handle::CSV modules don't like these characters; the snippets below both return errors when they get to one. snip

Re: displaying inline images in HTML email

2008-05-04 Thread David Newman
On 5/3/08 7:44 AM, Rob Dixon wrote: The src attribute of an HTML img element must be the URI of an image resource acceptable to the HTML renderer on your platform. I have never heard of anything that supports formats other than GIF, JPG or PNG files, so I don't th/ink your PDF file stands a

Re: displaying inline images in HTML email

2008-05-03 Thread David Newman
On 5/3/08 1:42 AM, Chas. Owens wrote: On Sat, May 3, 2008 at 1:26 AM, David Newman [EMAIL PROTECTED] wrote: I'm trying to include a PDF image both inline and as an attachment to an HTML email. The MIME::Lite module supports this, and the documentation even gives an example: snip I'm new

displaying inline images in HTML email

2008-05-02 Thread David Newman
I'm trying to include a PDF image both inline and as an attachment to an HTML email. The MIME::Lite module supports this, and the documentation even gives an example: http://tinyurl.com/uemf7 However, when I try this with the code below, the inline image doesn't display. (The attachment is

parsing CSV files with control and extended ASCII characters

2008-03-20 Thread David Newman
I have some CSV input files that contain control and extended ASCII characters, including: - vertical tabs (0x0B) - acute and grave accents - tildes - circumflexes - umlauts - nonbreaking spaces (0xA0) The Text::CSV or Tie::Handle::CSV modules don't like these characters; the snippets

Re: comparing some but not all fields in lists

2008-03-16 Thread David Newman
Jay Savage wrote: On Mon, Mar 3, 2008 at 5:32 PM, David Newman [EMAIL PROTECTED] wrote: Greetings. I'm looking to compare two contact lists in csv format, and then print out here are the records in in Llist only, in Rlist only, and what's in common. I should compare only 3 of the 82 fields

comparing some but not all fields in lists

2008-03-03 Thread David Newman
Greetings. I'm looking to compare two contact lists in csv format, and then print out here are the records in in Llist only, in Rlist only, and what's in common. I should compare only 3 of the 82 fields in each list. There are differences in some of the other fields that I should ignore. If

Re: Basic Math Problem

2006-01-03 Thread David Newman
On Tue, 3 Jan 2006, [EMAIL PROTECTED] wrote: $result = 1.00 - 9991.05; print \n\$result = $result; The result that is being printed is 8.950073 instead of 8.95. Can someone please tell me why perl acts this way. I am beginning to doubt perl's basic math capabilities. perl

Re: Basic Math Problem

2006-01-03 Thread David Newman
On Tue, 3 Jan 2006, Tom Phoenix wrote: On 1/3/06, David Newman [EMAIL PROTECTED] wrote: One quick fix here is to use printf instead: printf \n\%02f = %02f, $result, $result; I believe you were doing this to round off money numbers: numbers with exactly two digits after the decimal point

Bundle::CPAN problems on FBSD 5.2.1

2004-06-04 Thread David Newman
fix the CPAN routine? Thanks in advance David Newman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

arrays and subroutines

2003-03-16 Thread David Newman
in advance for any pointers. Regards, David Newman #!/usr/bin/perl use strict; use warnings; my $count = 10; my @ports; my $start = 1025; spin(@ports); sub spin { for (; $count 0; $count--) { push (@_, $start++); } } foreach (@ports) { print $_\n

iterating over selected lines

2002-10-22 Thread David Newman
David Newman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: adding stuff to array

2002-10-22 Thread David Newman
Hi, Can you ad a value to an array? fx: @xx = aa bb cc but I would like to put in ss so my new array would look like: @xx_new = aa bb cc ss sure: push (@xx, ss); David Newman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regexp matching across newlines

2002-07-22 Thread David Newman
is match (p1)any arbitrary amount of junk, including 0 or more newlines(p2) How do I do that? Thanks! David Newman -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: regexp matching across newlines

2002-07-22 Thread David Newman
many thanks... $/ = ''; Set $/ to undef instead. while(MYFILE) { if (m/(p1)*.(p2)/ms) { print match! I found $1 and $2\n.; } } this does work, but... When $/ is , it's like the regex /\n{2,}/. wouldn't this have worked before, since the pattern was