mail parser to read mails from stdin

2002-11-24 Thread Ramprasad A Padmanabhan
Hello all, I wish to write a small parser which will seperately file attachments coming to a particular email id. Which is the best module to read a mail from STDIN and create a MIME object so that I can save each attachement in a seperate file Thanks Ramprasad -- To unsubscribe, e-mail:

Re: a question about output

2002-11-24 Thread Jeff 'japhy' Pinyan
On Nov 25, Chris Ball said: > >> how can I output "first line\n" and "last line\n" to the screen > >> but save the result of system command "ls" to a file(eg > >> "result")(not appear on the screen")? > >>> On 24 Nov 2002 23:42:50, Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> said: > > Unbuffer

Re: a question about output

2002-11-24 Thread Chris Ball
>> how can I output "first line\n" and "last line\n" to the screen >> but save the result of system command "ls" to a file(eg >> "result")(not appear on the screen")? >> On 24 Nov 2002 23:42:50, Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> said: > Unbuffer STDOUT: > $| = 1; > See 'p

Re: a question about output

2002-11-24 Thread Jeff 'japhy' Pinyan
On Nov 24, stanley said: >print "first line\n"; > >system ("ls"); > >print "last line\n"; >how can I output "first line\n" and "last line\n" to >the screen but save the result of system command "ls" >to a file(eg "result")(not appear on the screen")? Unbuffer STDOUT: $| = 1; See 'perldoc per

a question about output

2002-11-24 Thread stanley
hi all, my script: #!/usr/bin/perl use strict; print "first line\n"; system ("ls"); print "last line\n"; how can I output "first line\n" and "last line\n" to the screen but save the result of system command "ls" to a file(eg "result")(not appear on the screen")? thanks Stan

Re: Some few basic Perl questions

2002-11-24 Thread Jenda Krynicky
From: "Mystik gotan" <[EMAIL PROTECTED]> > Hiya, > > I got some basic Perl questions. Hope you don't mind answerring them? > > 1) What is the use of just putting $var; on 1 line? Example: > #!usr/bin/perl -wT > > # some code > $var; > > Does this technique rescopes the variable? No. It doesn't

Re: need help with a bug

2002-11-24 Thread Jenda Krynicky
From: Gavin Laking <[EMAIL PROTECTED]> > On Tue, 19 Nov 2002 11:34:24 -0500 > "Sam Harris" <[EMAIL PROTECTED]> wrote: > > > I hve the follwing lines which are ginving error on line 1, please > > help, thanks > > > > use Digest::MD5 qw(md5); > > This line should be written as: > > use Digest::MD

Re: How to tally money datatype?

2002-11-24 Thread John W. Krahn
Chris wrote: > > So to put it all together. I am able to re-format a money datatype in > dollars to integer pennies with truncate/pad like so > > $amount = -11555; > $amount = -11555.; > $amount = -11555.9; > $amount =~ s/(?<=\.\d\d)\d+$//; > $amount .= ".00" unless $amount =~ tr/.//; > $amo

Re: Characters instead of regex patterns

2002-11-24 Thread Jenda Krynicky
From: "Jason Rauer" <[EMAIL PROTECTED]> > Say I have: > > foreach $string (@strings) { > if ($text =~ /$string/) { ... } > } > > Now, it happens that the data in $string contains \|()[{$^*.? etc. > that turn into regex metacharacters within m// but I want to match > them by their literal value,

Re: Mail::Sender question

2002-11-24 Thread Jenda Krynicky
From: Goodman Kristi - kgoodm <[EMAIL PROTECTED]> > I have the code (below) that works fine with the older version of > MAIL::SENDER (v0.7.06) but will not send with the new version of > MAIL::SENDER (v0.7.14.1) . Any thoughts? Maybe if you tested the return value of MailMsg/MailFile and printed

Re: Using Mail::Sender

2002-11-24 Thread Jenda Krynicky
From: Tin-Shan Chau <[EMAIL PROTECTED]> > Using the following program, I managed to send a message with an > attachment to multiple recipients using option 2, but not with options > 1 and 3: > > >> > use Mail::Sender; > $address1 = '[EMAIL PROTECTE

Re: I need some explainment on the MAP() Function

2002-11-24 Thread Paul Johnson
On Sun, Nov 24, 2002 at 01:09:26PM -0500, George Schlossnagle wrote: > It's also worth noting that it can modify your original array in place True, but I think this is more suited to C. > @a = ('bob','jane'); > map {$_ = ucfirst($_)} @a; $_ = ucfirst for @a; > This can be useful (or painful

Re: I need some explainment on the MAP() Function

2002-11-24 Thread George Schlossnagle
It's also worth noting that it can modify your original array in place @a = ('bob','jane'); map {$_ = ucfirst($_)} @a; This can be useful (or painful if you forget about it). George On Sunday, November 24, 2002, at 01:04 PM, Paul Johnson wrote: On Sun, Nov 24, 2002 at 12:13:55PM -0500, Tanton

Re: I need some explainment on the MAP() Function

2002-11-24 Thread Paul Johnson
On Sun, Nov 24, 2002 at 12:13:55PM -0500, Tanton Gibbs wrote: > So, the purpose of map is to change every element of an array in the same > way and create a new array with those changed elements. Quite. Whenever you need to create an list by performing an operation on every element of another li

Re: I need some explainment on the MAP() Function

2002-11-24 Thread Tanton Gibbs
map takes a code block or an expression and evaluates it for each element in a list for example... my @arr = (1,2,3,4,5); my @arr2 = map {$_ + 3} @arr; # notice no comma print "@arr2\n"; 4 5 6 7 8 So, each element of @arr had 3 added to it. Another example, using an expression would be my

Re: MySQL

2002-11-24 Thread Wiggins d'Anconia
This should have been interpolated, and you shouldn't see the join?? Maybe spaces are needed between the dots. $query = "SELECT ad_id FROM help_wanted WHERE ad_id in(" . join(',', @id_set) . ")"; Should print to be: SELECT ad_id FROM help_wanted WHERE ad_id in(24, 23, 22) Where the list inside

I need some explainment on the MAP() Function

2002-11-24 Thread Mystik Gotan
My last question... It's getting a bit too much.. I'm sorry for asking so much.. But I find it quite hard to understand the map() function. Can anybody explain this? Again, apologise for asking so much. But I'm just a 14 year old Dutch boy so sometimes it's a bit hard to follow the English refe

Re: Why the { # code # } ?

2002-11-24 Thread Paul Johnson
On Sun, Nov 24, 2002 at 01:53:47PM +0100, Mystik Gotan wrote: > Sorry for bothering all the time, hope you guys don't mind. Doesn't bother me ;-) > What's the use of { # code here # }. I thought this would be intentionally > used for complex code constructions. Do you agree? It puts the code i

Why the { # code # } ?

2002-11-24 Thread Mystik Gotan
Sorry for bothering all the time, hope you guys don't mind. What's the use of { # code here # }. I thought this would be intentionally used for complex code constructions. Do you agree? Sincerly, Bob Erinkveld (Webmaster Insane Hosts) www.insane-hosts.net __

Re: _ (underscore) in keyname in hash

2002-11-24 Thread Paul Johnson
On Sun, Nov 24, 2002 at 12:26:31PM +0100, Mystik Gotan wrote: > What does the underscore exactly do, when using _var? > Example: > package Person; >use Carp; >our $AUTOLOAD; # it's a package global >my %fields = ( >name=> undef, >age => undef, >p

_ (underscore) in keyname in hash

2002-11-24 Thread Mystik Gotan
What does the underscore exactly do, when using _var? Example: package Person; use Carp; our $AUTOLOAD; # it's a package global my %fields = ( name=> undef, age => undef, peers => undef, ); sub new { my $that = shift; my $cla

Re: Match pattern and print next line

2002-11-24 Thread badchoice
an alternative: $&&&print, /- Student Id|$/ for ; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: MySQL

2002-11-24 Thread Mariusz
Thank you for a reply. I did as you advised, my printed statement after executing the script looked like this: SELECT ad_id FROM help_wanted WHERE ad_id in(".join(',', 24 23 22).") but it didn't select any records. I got the result as 0E0 for number of found ones?? Mariusz - Original Message