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 u

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 > : >> >> This is a multi-part message in MIME format. >> >> --_--=_1297044547631150 >> Content-Disposition: inline >> Content-

Re: Attachment in Excel format?

2011-02-06 Thread David Newman
t/plain Here's the GIF file you wanted --_--=_1297044547631150 Content-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 письм

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: I

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

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. Than

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 slig

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
have only 82 columns. I've looked at the CSV files in vi and TextWrangler 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

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, The Text::CSV or Tie::Handle::CSV modules don't like these characters; the snippets below both return errors when they get to one. my

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 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 chance.

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

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 fi

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 bel

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 shoul

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. I

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 tw

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.

Bundle::CPAN problems on FBSD 5.2.1

2004-06-04 Thread David Newman
all various modules. How can I 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
Thanks 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) {

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:

iterating over selected lines

2002-10-22 Thread David Newman
/) { until ($tmp =~ /Iteration 2/) { if (/^(.*)$/sm) { push (@aa, $1); } } next; } # do stuff to $aa[whatever] here } any suggestions gratefully accepted thanks David

RE: regexp matching across newlines

2002-07-22 Thread David Newman
> Yes, but your *. should be .* to work. When you have Sorry, typo. It is .* in the code! > % If I do (for example) "p1 p2 p1 p2\n\np1 p2", shouldn't the > while loop match > % on 3 instances? If not, what should I use to match each instance? > > Now that it's all one big line, you need /g to

RE: regexp matching across newlines

2002-07-22 Thread David Newman
many thanks... > > >$/ = ''; > > Set $/ to undef instead. > > >while() { > > 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 t

regexp matching across newlines

2002-07-22 Thread David Newman
would like to do 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]