[21899] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4103 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 12 09:06:43 2002

Date: Tue, 12 Nov 2002 06:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 12 Nov 2002     Volume: 10 Number: 4103

Today's topics:
    Re: A vision for Parrot lvirden@yahoo.com
        ANNOUNCE: tclperl-2.4 (Jean-Luc Fontaine)
        emailing files with perl (ddineen.cs@clearstream.com)
    Re: emiling files with perl <Graham.T.Wood@oracle.com>
    Re: emiling files with perl <nobull@mail.com>
    Re: fetch all the bouncing e-mailaddresses (testversion1)
    Re: illegal use of comment ? <flavell@mail.cern.ch>
    Re: illegal use of comment ? news@roaima.freeserve.co.uk
    Re: LWP-download help <bart.lateur@pandora.be>
    Re: LWP-download help news@roaima.freeserve.co.uk
        Modem via mobile phone (Gilian)
    Re: newbie question <nobull@mail.com>
    Re: Newbie script needs help <nobull@mail.com>
    Re: Newbie with Perl (testversion1)
    Re: Perl: string vs. numeric <derek@wedgetail.com>
    Re: Perl: string vs. numeric news@roaima.freeserve.co.uk
        SAMIE module and frame (derek chen)
        sendmail diagnostic <anthony.heuveline@wanadoo.fr>
    Re: Splitting on a line break that isn't <rubberducky703@hotmail.com>
    Re: Splitting on a line break that isn't <rubberducky703@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 12 Nov 2002 12:44:56 GMT
From: lvirden@yahoo.com
Subject: Re: A vision for Parrot
Message-Id: <aqqt48$osk$1@srv38.cas.org>


According to Joe Schaefer  <joe+usenet@sunstarsys.com>:
:"Donal K. Fellows" <donal.k.fellows@man.ac.uk> writes:
:
:[Scary ... worrying ... security ... suspicious ... pipe-dream]
:
:Brazil (1985).

Security and Microsoft outlook/Internet Explorer - past 5 years or more...
-- 
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
<URL: mailto:lvirden@yahoo.com > <URL: http://www.purl.org/NET/lvirden/ >


------------------------------

Date: 12 Nov 2002 04:02:36 -0800
From: jfontain@free.fr (Jean-Luc Fontaine)
Subject: ANNOUNCE: tclperl-2.4
Message-Id: <4244613b.0211120402.7cb2fa56@posting.google.com>

### CHANGES ###

--- version 2.4 ---
- perl 5.8 compatibility

### README ###

tclperl version 2.4: a Perl package for Tcl

This package allows the execution of Perl code from a Tcl interpreter,
as in:

    package require tclperl
    set interpreter [perl::interp new]
    $interpreter eval {print "Hello World\n"}
    perl::interp delete $interpreter

You can actually create several Perl interpreters this way, if the
tclperl package was linked against a Perl library compiled with
-DMULTIPLICITY, otherwise only 1 Perl interpreter can exist at a time.

This package works on UNIX machines (Redhat Linux rpms available at
http://jfontain.free.fr/) and Windows (thanks to David Gravereaux,
DLL also available). See INSTALL file for more information.

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

###

you may find it now at my homepage:

http://jfontain.free.fr/tclperl-2.4.tar.gz
http://jfontain.free.fr/tclperl-2.4-1.i386.rpm
http://jfontain.free.fr/tclperl-2.4-1.spec
http://jfontain.free.fr/tclperl.htm

Jean-Luc Fontaine (http://jfontain.free.fr/)


------------------------------

Date: 12 Nov 2002 05:25:04 -0800
From: ddineen.cs@clearstream.com (ddineen.cs@clearstream.com)
Subject: emailing files with perl
Message-Id: <da25c255.0211120525.576431db@posting.google.com>

Hi,
I am trying to write a perl program which creates a randomly named
file, closes it and then emails it using the unix mail program. When I
run the program I get no errors but the mail is not sent. However if I
run it again and this time generate a new file, but email the one
generated in the previous run, the email is sent fine. It seems to me
that it is unable to email the file gererated during that run of the
program, it is as if the file handle has not been released by perl yet
(even though close has been called). It is as if the file actually has
not been created when I go to send the email.
I have provided two code snippets, the first shows a program trying to
email the file generated in that run (this fails), the second
generates a new file but emails the one generated in the previous run.
What do I need to do to the program so that I can generate a file,
close it and then email it on?
Any help is greatly appreciated,
Dave.


*************************************************************************
First code snippet
*************************************************************************
#refnum is 8 bits of randomly generated data. This is used as the
reference no #for request
$refnum = random_filename_generator();
open(TSDREQUEST,">../TSDRequests/CodeSigning/$refnum.req") || die
"Couldn't open.\n";

print TSDREQUEST "RequestType: Code Signing\n";
#loads of other print TSDREQUEST statements......
#I then close the file
close(TSDREQUESTS);
$the_cmd='mail ddineen.cs\@clearstream.com <
 ../TSDRequests/CodeSigning/'.$refnum;

$the_cmd .=".req";
print("$the_cmd");
system($the_cmd);
*************************************************************************
Second code snippet. For this run say, the file generated in the last
run
was vDE7aned.req. This email is sent.
*************************************************************************
#refnum is 8 bits of randomly generated data. This is used as the
reference no #for request
$refnum = random_filename_generator();
open(TSDREQUEST,">../TSDRequests/CodeSigning/$refnum.req") || die
"Couldn't open.\n";

print TSDREQUEST "RequestType: Code Signing\n";
#loads of other print TSDREQUEST statements......
#I then close the file
close(TSDREQUESTS);

$refnum="vDE7aned";
$the_cmd='mail ddineen.cs\@clearstream.com <
 ../TSDRequests/CodeSigning/'.$refnum;

$the_cmd .=".req";
print("$the_cmd");
system($the_cmd);


------------------------------

Date: Tue, 12 Nov 2002 12:15:35 +0000
From: Graham Wood <Graham.T.Wood@oracle.com>
Subject: Re: emiling files with perl
Message-Id: <3DD0F0E7.52813171@oracle.com>

> open(TSDREQUEST,">../TSDRequests/CodeSigning/$refnum.req") || die
> "Couldn't open.\n";
>
> print TSDREQUEST "RequestType: Code Signing\n";

> close(TSDREQUESTS);

If you cut and pasted this code, your problem could be you have mistyped the
filehandle name on your close statement. TSDREQUESTS has an extra "S".  This
means that it isn't closed before you call your email program.  Perl will
close the file for you at the end of your script, ie after the email was
sent.

Graham Wood



------------------------------

Date: 12 Nov 2002 13:00:39 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: emiling files with perl
Message-Id: <u93cq70wp4.fsf@wcl-l.bham.ac.uk>

ddineen.cs@clearstream.com (ddineen.cs@clearstream.com) writes:

> I am trying to write a perl program which creates a randomly named
> file,

Why would you want to do that?  A random number generator is a _bad_
way to get a unique value.  Anyhow why use a file at all?

> closes it and then emails it using the unix mail program.

Why would you want to do that?  The Unix mail program is not the ideal
tool for programatically sending mail.

See FAQ: "How do I send mail?"

> When I
> run the program I get no errors but the mail is not sent. However if I
> run it again and this time generate a new file, but email the one
> generated in the previous run, the email is sent fine. It seems to me
> that it is unable to email the file gererated during that run of the
> program, it is as if the file handle has not been released by perl yet
> (even though close has been called).

close() has been called but not on the file in question.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: 12 Nov 2002 03:17:03 -0800
From: testversion1@excite.com (testversion1)
Subject: Re: fetch all the bouncing e-mailaddresses
Message-Id: <6d559892.0211120317.621599c0@posting.google.com>

leifwessman@hotmail.com (Leif Wessman) wrote in message news:<64beeaad.0211110603.188312a0@posting.google.com>...
> Hi!
> 
> I have a file full of e-mailaddresses that bounced when we sent out
> our latest newsletter. All the e-mailaddresses are validated before
> they was sent out using this regular expression:
> 
> if ($email =~ /^[a-zA-Z0-9\-\._]+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/)
> {
>     print $email." is ok!\n";
> }
> 

I just wanted to add: your only allowing usernames that contain
letters, numbers, dashes, periods or underscores. It is my
understanding that there are other characters that are allowed in
email addresses such as an ampersand (me&you@myserver.com) that are
valid. The only characters that i'm aware of that are not allowed for
sure are commas, another @ sign, and your group of spaces and the
like. Anyone else know what other characters are absolutely not
allowed?


------------------------------

Date: Tue, 12 Nov 2002 11:48:54 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: illegal use of comment ?
Message-Id: <Pine.LNX.4.40.0211121135020.4739-100000@lxplus075.cern.ch>


[OT, but you did ask...]

On Nov 12, Walter Roberson inscribed on the eternal scroll:

> Using the character '#' has some ambiguity:

Your Usenet posting was lacking the content-type header which would
have declared your character coding, so in the context of your posting
you could indeed claim some ambiguity.  It's only by convention that
we are assuming you intended it to be us-ascii.

> ASCII allowed the display
> for that position to be the UK pounds-stirling L-bar symbol.

Well, not "ASCII" as such.  The "A" in ASCII is for (US-)American.

> (Or was it ANSI X.3? I get the two confused.)

ANSI X3.4 was the committee which codified (US-)ASCII: in the context
of character codings, the terms (US-)ASCII and ANSI X3.4 are
synonymous.

National versions were under the general umbrella of iso-646.
There's a handful of code positions in iso-646 which are denoted
"national characters", and those were understood to be available for
national variations, but it was none of the business of ANSI to
determine what those national variations should be!

Some folks use the terms ASCII in the broader sense of iso-646, and
US-ASCII to denote specifically the US national version, but this can
cause confusion IMHO.

best



------------------------------

Date: Tue, 12 Nov 2002 12:01:57 +0000
From: news@roaima.freeserve.co.uk
Subject: Re: illegal use of comment ?
Message-Id: <ljqqqa.q1s.ln@moldev.cmagroup.co.uk>

Benjamin Goldberg <goldbb2@earthlink.net> wrote:
> [...] times (only when used to multiply things
> together, otherwise it's "asterix"), [...]

Asterisk. Unless you're referring to that nice Gaulish chappy [1]
Chris

[1] http://www.asterix.tm.fr or http://www.asterix.tm.fr/english/
-- 
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


------------------------------

Date: Tue, 12 Nov 2002 12:16:23 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: LWP-download help
Message-Id: <v5s1tugkrm62rv1ltdmc69ogk7jqb5p8bd@4ax.com>

Chris Liu wrote:

>Somehow lwp-download doesn't recognize the variables in the URL string
>when I use the GET method. Any advice? Thanks.

Ooh. How vague. Where's the code? However, I'll take a stab. get()
doesn't use variables. It requires a valid URL as a parameter. My guess
is that you used single quotes to construct the URL string where you
should have used double.

-- 
	Bart.


------------------------------

Date: Tue, 12 Nov 2002 13:46:16 +0000
From: news@roaima.freeserve.co.uk
Subject: Re: LWP-download help
Message-Id: <8n0rqa.v7u.ln@moldev.cmagroup.co.uk>

Chris Liu <fcqmax@pchome.com.tw> wrote:
> Somehow lwp-download doesn't recognize the variables in the URL string
> when I use the GET method. Any advice? Thanks.

You'll need to provide an example of some code showing what doesn't work
(please DO NOT post more than a few lines!).

Chris
-- 
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


------------------------------

Date: 12 Nov 2002 04:20:26 -0800
From: linux@colsen.org (Gilian)
Subject: Modem via mobile phone
Message-Id: <f325939e.0211120420.230a4408@posting.google.com>

Hi all,

I want to write a small script that makes it possible to setup a call
with my mobile phone (connected via a link to the serial port). When
the phone is dialing I want to see the feedback (like RING, BUSY,
etc.).

I have tried some scripts, but nothing is really working.

Can somebody please help?

Regards,
Gilian


------------------------------

Date: 12 Nov 2002 12:21:12 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: newbie question
Message-Id: <u9bs4v0yhw.fsf@wcl-l.bham.ac.uk>

u712646484@spawnkill.ip-mobilphone.net  (raoul_s2222@yahoo.com) writes:

> Subject: newbie question

Please put the subject of your post in the Subject of your post.  If
in doubt try this simple test.  Imagine you could have been bothered
to have done a search before you posted.  Next imagine you found a
thread with your subject line.  Would you have been able to recognise
it as the same subject?

If the best you can come up with to describe your problem is "newbie
question" then you've given the matter nowhere near enough thought to
be asking help from other people.

> I am very new to perl but need this code for a purpose.

You probably should either try to learn enough Perl to do it yourself
or hire someone who already knows Perl.  Please do not seek someone to
do your work for you for free.

> 1) how do i modify this code so that it skips the header size
> of 4,8,16,... bytes.

The Perl function to read a specified number of bytes from a input
stream is read().  Examples of how to use it can be found in the manual.

> 2) how to convert to decimal as well (as a choice)?.

> $_format    = "\\x%02X";

>     $s .= sprintf(
>             $_format, ord(getc(F)));

The formatting string in $_format is used to control the format.  The
semeantics of sprintf() formats can be found in the manual.

Conditional execution can be implemented using, amongst other things,
the 'if' statement.  There are already examples of this in the
script. Further details can be found in the manuals.

The command line arguments can be acessed as $ARGV[0], $ARGV[1] etc.
There are already examples of this in the script. These are the
elements of the special Perl array variable @ARGV.

The newsgroup comp.lang.perl does not exist.  Please do not start
thread threre.  See FAQ.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: 12 Nov 2002 12:49:02 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Newbie script needs help
Message-Id: <u97kfj0x8h.fsf@wcl-l.bham.ac.uk>

al <al@onetel.net.uk> writes:

> Subject: Newbie script needs help

Please put the subject of your post in the Subject of your post.  If
in doubt try this simple test.  Imagine you could have been bothered
to have done a search before you posted.  Next imagine you found a
thread with your subject line.  Would you have been able to recognise
it as the same subject?

If the best you can come up with to describe your problem is "newbie
script needs help" then you've given the matter nowhere near enough
thought to be asking help from other people.

> I'm new to Perl

There is some advice that it given to all newcommers to Perl. 

Rather than posting and making us repeat it why not do something
really smart and follow this advice without waiting to be given it
personally?

> and could use some help with a script I am trying to
> write.

So ask for it!  Don't ask us.  Ask Perl.  Enable warnings ('use
warnings').  Enable strictures ('use strict'). Check the return status
of operations like open() that can often fail.  If they do fail then
print out the reason why.  

Declare all variables as lexically scoped in the smallest enclosing
scope unless there is a reason not to do so.  This is not specific to
Perl - it's universal to programming in high level languages.

None of this will help with the matter at hand but the fact that you
jumped in and posted without doing all this means that you are
cutting-in-line and it will not make people kindly disposed towards
you.

>  The program should pull in a comma-delimited text file called
> "qa.db".  It should prompt the user for the string and which field to
> be searched.

Yes I can see this.

>  It should then search for a string by field -- i.e., not
> just anywhere on the line, but by specific parts of the line as
> delimited by the commas.

There is no evidence that you have attempted to to this.  The thing
about "specific" anything this that it needs to be _specified_.  Since
you've not indicated how it will be specified I'm pretend like the
word "specific" did not appear above.

> I have been able to pull in qa.db but cannot get the search routine to
> fly.  Any ideas?

What particular part are you finding difficult?
 
> search.pl:
> 
> #!/usr/bin/perl 
> # A program to read in a database 
> # and search it by field
> # for a string issued by the user
> #
> 
> $file = 'qa.db' ;                  # Name the file
> open(INFO, "<$file" ) ;               # Open the file
> @lines = <INFO> ;                     # Read it into an array
> close(INFO) ;                         # Close the file

Why are you slurping?  If you only intend to traverse the file content
once there's no point in slurping.
 
> print "Search string: " ;          
> read STDIN, $search, 3, 0;         #Prompt user for search string

The readline() function is probably more appropriate.

Don't waste your time putting in comments that add nothing.

If you do put in comments try to put them next to the code they
describe, not something else.

> print "\n Results for $search : ";  
> 
> foreach $line (@lines)              #My search routine  
> {
> 
> if ($line =~ /^ $search/cis )
> {
>   print " $line \n" ;
> }
> }

Since $line will only ever contain one line the /s qualifer has no
effect.  The /c qualifer only qualifies the /g qualifier so /c without
/g is meningless.

You find lines that start with a space followed by a case-insensative
match for the regular expression entered by the user and then print
out the line (indented by one space) followed by a blank line
(actually a line containg just a single space).  This doesn't seem to
match what you said you wanted to do.

If you want to look (case-insensatively) for the _string_ (not regex)
in $search but only when it appears bounded by commas or the
start/end of line then a regex you could use would be:

 /(^|,)\Q$search\E(,|$)/

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: 12 Nov 2002 03:24:00 -0800
From: testversion1@excite.com (testversion1)
Subject: Re: Newbie with Perl
Message-Id: <6d559892.0211120324.2bda8729@posting.google.com>

Michael J Wilusz <mjwilusz@acsu.buffalo.edu> wrote in message news:<aqpsff$5ff$1@prometheus.acsu.buffalo.edu>...
> Hey All!
>      Great newgroup!  It's hard to find one where everyone is down to Earth
> and not lookin to hurt eachother.  Anyways... onto Perl.  Never touched it,
> but must say I've heard a lot with Perl scripts and such.  Here's what I
> need to do:
> 
> -Take a filename as a command line argument.
> -The file will contain lines which are either a comment,
> beginning with the character #, or records of
> white-space-seperated fields of the format:
> 
> 
> -I will be using a remote file called names.dat as my input.
>     -This file is a list of names (makes sense, right?)
>     -The line's look like the following
>                                            tldona             TLD      Tony
> L    Danza    523-8426 Junior_Designer RO
>   Here's what each means:  Unix-username Initials Firstname MI Lastname
> Phone       Site                    Attributes
> 
> 
> The output should l ook like this:
> 
>         Phone Book
> 
> Name                    Telephone
> =============================
> Tony       Danza     584 523 8426

I don't think your gonna get much help unless your willing to do some
work yourself. Most people come here with questions about their perl
problems, not seeking work for hire. Try learning a bit of perl first,
it looks like your problem can be solved quite easily without having
to stress your brain or learn too much. Then, if you find your script
wont work, come back and post the problems with it. It's more likely
you'll get help that way.

> 
> And here's a hint I was given:
>         Hint: the first line of your script should be:
>         #! /util/bin/perl -w
> 

Thanks for the hint...


------------------------------

Date: Tue, 12 Nov 2002 11:18:38 GMT
From: Derek Thomson <derek@wedgetail.com>
Subject: Re: Perl: string vs. numeric
Message-Id: <is5A9.20$ri6.796@news.optus.net.au>

yisraelharris wrote:
> When I pass an array which contains ('hi', 3) to a function, and
> then the function takes each element a builds a string, I get
> ".....hi 3......".
> 
> What I really want is to get ".....'hi' 3....."
> 
> For now, I'm passing it ("'hi'", 3) and that works. (That's single
> quotes inside double quotes, if it's difficult to discern.)

This is a perfectly good method.

It all depends on what you're actually trying to do, as to whether it's 
best for the caller or the subroutine to add the quotes. The reason the 
quotes are not "kept" is that they merely delimit the start and end of 
the string for the compiler. Imagine if every string kept the quotes - 
you would have to strip them out again almost every single time.

If you want the subroutine to try to detect if the argument is not a 
number, and then quote it, you'll find ways to do this in the Perl 
documentation that you already have.

> 
> If there's a better solution, where the function knows that the first
> element had quotations and the second doesn't, and proceeds accordingly,
> I'd be very grateful if someone could tell me.
> 
> If you please: I'd appreciate no advice, comments, questions, etc.
> Please direct solutions to this question only. Thank you :)
> 

There is no direct answer, because you don't understand the difference 
between string and numeric literals, and we can't possibly tell what 
you're trying to do from your question, unless we guess.

Why *wouldn't* you want advice, comments or questions to clarify the 
problem? It's clear that you need the first two badly. There's only one 
reason I can think of aside from sheer laziness, and I think it would be 
best if you did your own homework.

--
D.



------------------------------

Date: Tue, 12 Nov 2002 13:53:07 +0000
From: news@roaima.freeserve.co.uk
Subject: Re: Perl: string vs. numeric
Message-Id: <341rqa.v7u.ln@moldev.cmagroup.co.uk>

yisraelharris <member@mainframeforum.com> wrote:
> When I pass an array which contains ('hi', 3) to a function, and
> then the function takes each element a builds a string, I get
> ".....hi 3......".

> What I really want is to get ".....'hi' 3....."

	sub f
	{
	    return ".....'$[0]' $[1].....";
	}

	$answer = f ('hi', 3);

> If you please: I'd appreciate no advice, comments, questions, etc.
> Please direct solutions to this question only. Thank you :)

No, I *am* going to comment. Your question is ambiguous, and as such I
have chosen to answer one interpretation of it. Your actual requirement
is almost certainly different, but without asking questions and making
comments explaining the rationale it is almost impossible to guess what
you really want.

Will you let us help you?

Chris
-- 
@s=split(//,"Je,\nhn ersloak rcet thuarP");$k=$l=@s;for(;$k;$k--){$i=($i+1)%$l
until$s[$i];$c=$s[$i];print$c;undef$s[$i];$i=($i+(ord$c))%$l}


------------------------------

Date: 12 Nov 2002 03:08:27 -0800
From: u8526505@ms27.hinet.net (derek chen)
Subject: SAMIE module and frame
Message-Id: <85789064.0211120308.25e8c649@posting.google.com>

Downloaded the module and played it a bit.quite cool! But I don't know
how to use it to manipulate controls in frames.any tip? thanks.

Derek


------------------------------

Date: Tue, 12 Nov 2002 15:02:13 +0100
From: "Anthony" <anthony.heuveline@wanadoo.fr>
Subject: sendmail diagnostic
Message-Id: <aqr1en$s67$1@news-reader10.wanadoo.fr>

Hi,

    I am using sendmail to keep my website visitors informed. These visitors
make part of several categories and their informations are saved in a
database. When I want to send an email, I select the concerned categories
and then send the email to the addresses which belong to these categories
using a while loop.

    My problem is that all works fine, exept with one category. I checked
the addresses of this category and they seem to be valid. How can I get
error messages giving informations on the problem that occured?

    Thank you for your help.

Anthony.

PS: Here is the program I use

sub send_mail {
    my($to, $from, $subject, @body)=@_;

    # Change this as necessary for your system
    my $sendmail="/usr/lib/sendmail -t -oi -odq";

    open(MAIL, "|$sendmail") || die "Can't start sendmail: $!";
    print MAIL<<END_OF_HEADER;
From: $from
To: $to
Subject: $subject

END_OF_HEADER
    foreach (@body) {
            print MAIL "$_\n";
    }
    close(MAIL);
}




------------------------------

Date: Tue, 12 Nov 2002 11:20:07 -0000
From: "Rubber Duck" <rubberducky703@hotmail.com>
Subject: Re: Splitting on a line break that isn't
Message-Id: <aqqo38$cb7on$1@ID-116287.news.dfncis.de>

yeah its windoze.

about to try what you suggested hope it works :-/


"tk" <tk@WINDOZEdigiserv.net> wrote in message
news:svn1tu4ho6m3bd0fsq3d9uul1dbu31fkkn@4ax.com...
> In a fit of excitement on Tue, 12 Nov 2002 10:25:57 -0000, "Rubber Duck"
> <rubberducky703@hotmail.com> managed to scribble:
>
> | I'd love to parse on the "square box" but i don't know and can't find
the
> | ascii code for it. It looks similare to # 219 on
http://www.asciitable.com/
> | except its hollow???
>
> Would I be correct in assuming you're developing this on a windoze box?
> IF so, I've got a feeling I had a similar problem writing a program a
> lil while back. Instead of using "\n", have you tried "\r"? It solved my
> problem =)
>
> HTH.
>
>
> Regards,
>
>   tk
>
> --
> +--------------------------+
> |     digiServ Network     |
> |      Web solutions       |     Remove WINDOZE to reply.
> | http://www.digiserv.net/ |
> +--------------------------+




------------------------------

Date: Tue, 12 Nov 2002 11:27:46 -0000
From: "Rubber Duck" <rubberducky703@hotmail.com>
Subject: Re: Splitting on a line break that isn't
Message-Id: <aqqohj$cblap$1@ID-116287.news.dfncis.de>

worked a treat - thanks all
"Rubber Duck" <rubberducky703@hotmail.com> wrote in message
news:aqqo38$cb7on$1@ID-116287.news.dfncis.de...
> yeah its windoze.
>
> about to try what you suggested hope it works :-/
>
>
> "tk" <tk@WINDOZEdigiserv.net> wrote in message
> news:svn1tu4ho6m3bd0fsq3d9uul1dbu31fkkn@4ax.com...
> > In a fit of excitement on Tue, 12 Nov 2002 10:25:57 -0000, "Rubber Duck"
> > <rubberducky703@hotmail.com> managed to scribble:
> >
> > | I'd love to parse on the "square box" but i don't know and can't find
> the
> > | ascii code for it. It looks similare to # 219 on
> http://www.asciitable.com/
> > | except its hollow???
> >
> > Would I be correct in assuming you're developing this on a windoze box?
> > IF so, I've got a feeling I had a similar problem writing a program a
> > lil while back. Instead of using "\n", have you tried "\r"? It solved my
> > problem =)
> >
> > HTH.
> >
> >
> > Regards,
> >
> >   tk
> >
> > --
> > +--------------------------+
> > |     digiServ Network     |
> > |      Web solutions       |     Remove WINDOZE to reply.
> > | http://www.digiserv.net/ |
> > +--------------------------+
>
>




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 4103
***************************************


home help back first fref pref prev next nref lref last post