[17951] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 111 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 21 14:05:31 2001

Date: Sun, 21 Jan 2001 11: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)
Message-Id: <980103909-v10-i111@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 21 Jan 2001     Volume: 10 Number: 111

Today's topics:
    Re: CGI Timeout - Avoiding <bigbadwolf@konnie.com>
    Re: CGI Timeout - Avoiding dtbaker_dejanews@my-deja.com
    Re: DBI/Oracle why SPACE ? gnari@my-deja.com
    Re: DBI/Oracle why SPACE ? (Garry Williams)
    Re: DBI/Oracle why SPACE ? (Tad McClellan)
        re: DBI/Oracle why SPACE ? <peter@cgi-shop.dk>
    Re: DBI/Oracle why SPACE ? <godzilla@stomp.stomp.tokyo>
    Re: Deleting a line from file (Tad McClellan)
    Re: Directory Last Modified (Tad McClellan)
        Don't know how to reference array position from a forea shiloam@pacbell.net
    Re: interesting regex? amit_mathur@my-deja.com
        Internal Server Error- Newbie Question. <aplata@primus.ca>
    Re: isInNet() function (Garry Williams)
    Re: LDAP & SSL in Perl <mindmore@mindless.com>
    Re: matching "*"? <jason@uklinux.net>
    Re: Perl Crashes on my Win2k Box (Tarael200)
        Posting Guidelines (Re: Perl  - Bytecode, Compile to C, (Tad McClellan)
        Posting Guidelines (was Re: Perl - Bytecode, Compile to (Tad McClellan)
        Still Can't Get MIME Lite To Send Attachment... (Rand Simberg)
        Thread limit (12) on WIN32 mintcake@my-deja.com
    Re: X-FILES problem (Tad McClellan)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 21 Jan 2001 15:01:31 -0000
From: "Tamer" <bigbadwolf@konnie.com>
Subject: Re: CGI Timeout - Avoiding
Message-Id: <6SCa6.8595$vH6.135655@news6-win.server.ntlworld.com>

> This is a question about web server configuration - unrelated in any
> way to Perl.

Actually, I asked if there was any way to trap the error in my script ,
therefore it is a relevant question.

Many thanks for your useful and friendly reply.






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

Date: Sun, 21 Jan 2001 16:30:16 GMT
From: dtbaker_dejanews@my-deja.com
Subject: Re: CGI Timeout - Avoiding
Message-Id: <94f2qp$lhm$1@nnrp1.deja.com>

In article <lL_96.1035$vH6.18313@news6-win.server.ntlworld.com>,
  "Tamer" <tamer@nospam.yahoo.co.uk> wrote:
> I have a script which keeps timing out with the following error:
>
> CGI Timeout
> The specified CGI application exceeded the allowed time for
processing. The
> server has deleted the process.
>
> I wonder if the server has been set up with a very short timeout as
this
> occurs after 10 seconds or less.
> Is there anyway I can avoid this error , increase the timeout setting
, or
> at least trap the error?
>
----------------

if you suspect that your perl script is getting stuck in a loop, or slow
in some iteration, you could keep track of clock time somewhere in a
global variable and blow out with an error message after n seconds...

otherwise, you can be sure to turn autoflush on, and send something from
the server to client so it knows you are alive:

$|=1;
print "Content-type: text/html\n\n";
print "working...";

you can get more fancy and write a page that refreshes to itself, and
the re-print with a redirect when you are all done.

D


Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 14:37:00 GMT
From: gnari@my-deja.com
Subject: Re: DBI/Oracle why SPACE ?
Message-Id: <94es6c$ge0$1@nnrp1.deja.com>

In article <94ehfr$hiu$1@news.inet.tele.dk>,
  "Peter" <peter@cgi-shop.dk> wrote:
> Hi
> I´m working with perl/DBI/Oracle8
> ____________________________________________________
> 1) When i try this:
> $sth->dump_results();
>
> I get this:
> '.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' 4 rows
> - Why is there dots between all characters ?
> ____________________________________________________
> 2) When i try this:
> while (@row=$sth->fetchrow_array())
> {
> print "@row";
> print " ok<br>";
> }
>
> I get this:
>  f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br>
> - Why is there space between all characters ?


perldoc DBI says that the dot is for unprintable characters,
so my guess is that in the second example, what you call space is
not space, but an unprintable character that resembles space
TAB sometimes looks like space
NBSP looks really a lot like space

on my system, DBI views both of these as printable characters, but
who know about yours?

are you really sure these are spaces, not some other (unprintable)
character?

gnari




Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 15:32:05 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: DBI/Oracle why SPACE ?
Message-Id: <VhDa6.5458$tg4.20902@eagle.america.net>

On Sun, 21 Jan 2001 12:33:08 +0100, Peter <peter@cgi-shop.dk> wrote:
>I´m working with perl/DBI/Oracle8
>____________________________________________________
>1) When i try this:
>$sth->dump_results();
>
>I get this:
>'.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' 4 rows
>- Why is there dots between all characters ?

Did you check the DBI manual page?  It explains the dump_results()
method and how to control what it prints.  

>____________________________________________________
>2) When i try this:
>while (@row=$sth->fetchrow_array())
>{
>print "@row";
>print " ok<br>";
>}
>
>I get this:
> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br>
>- Why is there space between all characters ?

Did you read the perldata manual page about interpolation of arrays
(and array slices) into double-quoted strings?  

-- 
Garry Williams


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

Date: Sun, 21 Jan 2001 15:38:41 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: DBI/Oracle why SPACE ?
Message-Id: <slrn96lpol.gb2.tadmc@tadmc26.august.net>

Peter <peter@cgi-shop.dk> wrote:

>2) When i try this:

>print "@row";
       ^    ^
       ^    ^ interpolating an array inserts $" between elements

>I get this:
> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br>
>- Why is there space between all characters ?


See the $" special variable:

   perldoc perlvar


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 21 Jan 2001 18:27:00 +0100
From: "Peter" <peter@cgi-shop.dk>
Subject: re: DBI/Oracle why SPACE ?
Message-Id: <94f67e$f9n$1@news.inet.tele.dk>

> are you really sure these are spaces, not some other (unprintable)
> character?

It seems like spaces.......how do i detect if it is ?
And how do I delete them?

I have tried this before printing:
$, = "";
But I still got the space

I have also tried this to delete the space
$row[0]=~ s/ //ig;
$row[1]=~ s/ //ig;
But I still got the space



Peter




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

Date: Sun, 21 Jan 2001 10:56:16 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: DBI/Oracle why SPACE ?
Message-Id: <3A6B30D0.24DBD73E@stomp.stomp.tokyo>

Peter wrote:

(some snippage for brevity)

> I´m working with perl/DBI/Oracle8

> 1) When i try this:

> $sth->dump_results();
> 
> I get this:
> '.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' '.f.1', '.f.2' 4 rows
> - Why is there dots between all characters ?

> 2) When i try this:

> while (@row=$sth->fetchrow_array())
> {
> print "@row";
> print " ok<br>";
> }
 
> I get this:
>  f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br> f 1  f 2 ok<br>
> - Why is there space between all characters ?


Look at my syntactic differences for printing an
array in my test code below and yielded results.

Godzilla!

--

TEST SCRIPT:
____________


#!/usr/local/bin/perl

print "Content-type: text/plain\n\n";


@Array = ("a", "b", "c");

print "Print Array Enclosed In Quotes:\n\n";

print "@Array";


print "\n\nPrint Array Not Enclosed In Quotes:\n\n";

print @Array;

exit;


PRINTED RESULTS:
________________

Print Array Enclosed In Quotes:

a b c

Print Array Not Enclosed In Quotes:

abc


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

Date: Sun, 21 Jan 2001 15:38:38 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Deleting a line from file
Message-Id: <slrn96ljop.gb2.tadmc@tadmc26.august.net>

Jeffrey Grace <gracenews@optusnet.com.au> wrote:
>"Tad McClellan" <tadmc@augustmail.com> wrote in message
>news:slrn96j61l.9cm.tadmc@tadmc26.august.net...
><snip>
>> The other process locks the file, reads and removes the first line,
>> and unlocks the file.
>>
><snip>
>> will likely help with the add-a-line and remove-a-line part
>> of the solution to your problem.
>>
>>    perldoc -q lock
>>    perldoc -f flock
>>
>> will get you started on the file-locking part.
>>
>
>I had a look through the above plus file locking man page and found no
>answer to below question:
>I wich to delete a line of text from a file, but there is a brief period
>where the file will not exist, and an open (FH, > file) will re-create a
>blank version.


I think you are saying that you want a _real_ in-place edit, that is,
you want the new file to have the same inode number as the original
file. Would that solve your problem?


>--------------------------------
[snip]
># Problem: There will be a brief period where there is no data file. Between
>A and B.
>
>      flock(DATA, LOCK_UN);   # I've others say this line isn't needed as
>close will do it,
>   close(DATA);   # but this is how it is in the FAQ.
>   unlink($data_file);     # A (see above)
>   if ($fileLocking eq "Enabled") {
>      flock(TEMP, LOCK_UN);
>   }
>   close(TEMP);
># I've seen this done with two renames but there is still a period where the
>data file is missing
>   rename($temp_file, $data_file); # B (see above)
>}
>---------------------------------------
>
>Is there anything I can do to stop a new file from being created, I know the
>temp file will replace any created file at the rename, but any access to the
>file from another process before the rename will either see a blank file or
>no file.  I've just thought about changing the appropriate opens to sysopen
>(with write but not create) but the file still won't exist at times.  I can
>modify the code to retry on open for readings
>eg:
>open (FH, file) || open (FH, file), etc || die (message).
>
>Is there a better way?


[ snip quoted .sig. Please do not quote signatures ]

If you can live with putting the entire file into memory,
then you can edit the same inode by using open() with
"+<" and:

   perldoc -f open
   perldoc -f seek
   perldoc -f truncate


Something like (locking not included):

----------------------
use Fcntl qw/SEEK_SET/;

# read data
open(INDATA, "+<$data_file") or die "$!";
my @indata = <INDATA>;

# manipulate @indata (e.g. remove last line)
pop @indata;

# write modified data
seek(INDATA, 0, SEEK_SET) or die "$!";
truncate(INDATA, 0) or die "$!";
print INDATA @indata;
close(INDATA);
----------------------


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 21 Jan 2001 15:38:38 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Directory Last Modified
Message-Id: <slrn96ljqq.gb2.tadmc@tadmc26.august.net>

BUCK NAKED1 <dennis100@webtv.net> wrote:

>Thank You. I really appreciate it.


Please quote a bit of context so folks will know what
the heck you are referring to. Thanks.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 21 Jan 2001 17:37:40 GMT
From: shiloam@pacbell.net
Subject: Don't know how to reference array position from a foreach loop
Message-Id: <94f6p4$ogs$1@nnrp1.deja.com>

If I have used a foreach loop like so:

foreach $client (@ready) {

   ready[?]

}

How do I reference the current position that I am at in the array???

Sorry for the newbie question, but I'm a newbie to perl.

Steve Tilden


Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 15:03:12 GMT
From: amit_mathur@my-deja.com
Subject: Re: interesting regex?
Message-Id: <94etne$hjk$1@nnrp1.deja.com>

Hi Tad, nobull:

just being curious...

the following program seems to work...?!!
----<perl program begin>----
#!/hm/amitk/bin/perl -w
use strict;

my $test = q{  <companies_house_data>
<cro_number values="Y(Yes),N(No)"></cro_number>
<name></name>
<acc_ref_date></acc_ref_date>
<dissolved_flag></dissolved_flag>
<dissolved_date></dissolved_date>
<company_status></company_status>
<no_accounts_filed></no_accounts_filed>
<ro_address>
        <line_one></line_one>
        <line_two></line_two>
        <line_three></line_three>
        <line_four></line_four>
        <postcode></postcode>
</ro_address>
</companies_house_data>
<hello>
        <hi></hi>
</hello>};

$_ = $test;

my @tags = m[<(\w+)>.*</\1>]sg;

print "TAGS = @tags\n";

----<perl program end>----

thanks,
amit.

In article <9475ep$c0j$1@nnrp1.deja.com>,
  David Waters <davidwaters@bigfoot.com> wrote:
> Just wondering how I would use a regeex to pull out all the top level
> tags from the following?
>
> <companies_house_data>
> <cro_number values="Y(Yes),N(No)"></cro_number>
> <name></name>
> <acc_ref_date></acc_ref_date>
> <dissolved_flag></dissolved_flag>
> <dissolved_date></dissolved_date>
> <company_status></company_status>
> <no_accounts_filed></no_accounts_filed>
> <ro_address>
> 	<line_one></line_one>
> 	<line_two></line_two>
> 	<line_three></line_three>
> 	<line_four></line_four>
> 	<postcode></postcode>
> </ro_address>
> </companies_house_data>
> <hello>
> 	<hi></hi>
> </hello>
>
> The result should only contain "companies_house_data" and "hello" .
>
> Thanks
>
> David
>
> Sent via Deja.com
> http://www.deja.com/
>


Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 13:08:53 -0500
From: "Andrew P" <aplata@primus.ca>
Subject: Internal Server Error- Newbie Question.
Message-Id: <hDFa6.191$yo4.27648087@news1.tor.primus.ca>

 I am running apache server under Red Hat 6.2. At the moment I am receiving
Error Msg 500: Internal Server
 Error while trying to run a perl script. I know the script works because
when the Form Action points to another webserver it works fine.

Looking on the internet I came across some information. One of the things I
did not do was download my scripts as ASCII. So I will try that and see how
it works.

However, I just wanted to know is it possible I am missing something in the
configuration files for apache server?

Thanks,

Andrew P





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

Date: Sun, 21 Jan 2001 17:09:26 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: isInNet() function
Message-Id: <aJEa6.5474$tg4.22218@eagle.america.net>

[ Please don't send stealth Cc's. ]

On Fri, 19 Jan 2001 09:12:14 +0100, Dr. Peter Dintelmann
<Peter.Dintelmann@dresdner-bank.com> wrote:
>"Garry Williams" <garry@zvolve.com> wrote in message
>news:vfG96.323$032.11756@eagle.america.net...
>> >        print isInNet( '0.0.0.0', '3.255.255.255', '3.2.3.4' );
>> >
>> >        sub isInNet
>> >        {   my ($start, $end, $ip) = @_;
>> >            return convert($start) < convert($ip) && convert($ip) <
>> >convert($end);
>> >
>> >            sub convert {unpack( "L", join '',map chr,reverse
>> >split(/\./,$_[0]) )}
>> >        }
>>
>> I think the OP meant for the parameters to be:
>>
>>   address to be tested
>>   network address
>>   network mask
>
>    I did not spot a valid netmask in his posting

Which I mentioned and you quoted below.  

>> where all of these are expressed in a dotted decimal string.  His
>> example was flawed in that the network address didn't make sense with
>> the given mask, but I think that's what he meant.
>
>> You seem to be changing that profoundly.
>
>    yepp, my code is intended to test if a given address is
>    between a start and an end address.
>
>> Furthermore, your code to
>> convert a string form of an IP address into binary won't compile.
>
>    strange. It runs under 'use strict' without any problems on
>    my machine (perl, v5.6.0 built for MSWin32-x86-multi-thread).
>    The code was cut/paste directly from my editor.

And after I re-pasted it, I see that, too.  I guess I missed the
broken line-wrapping.  

>> am confused about what you really intend.
>
>    convert() converts an IP address into a base10 value. These
>    values are compared.

My point was that the OP intended a check for membership in a network.
It happens that that is easier than checking for an arbitrary range.  

I would also add that there's no reason to convert to base 10 to check
the range.  Simply convert to base 2 with inet_aton().  

-- 
Garry Williams


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

Date: Sat, 20 Jan 2001 23:45:54 +0200
From: cyphunk <mindmore@mindless.com>
To: utsav_ratti@my-deja.com
Subject: Re: LDAP & SSL in Perl
Message-Id: <3A6A0712.CBA50B01@mindless.com>

We just did this.  Not myself but I setup the system.  We used a Apache
w/mod_ssl (requires openssl), mod_perl, mod_auth (requires openldap, I
believe) the Apache::Session module (I believe that is the tree),
Digest::MD5 and I believe a perl LDAP module (see search.cpan.org or
something like that).

So, not that it looks hellishly impossible I'll let someone else on the
list come and tell you what of the above you don't really need for what
you are specifically trying to do.

good luck.

- cyphunk

utsav_ratti@my-deja.com wrote:

> I am trying to put together a script that will authenticate a user
> against an LDAP directory, but SSL encryption is a requirement.
>
> Any suggestions of appropriate Perl modules would be much appreciated.
> Working code examples would be even better! :)
>
> Thanks,
> Utsav
>
> Sent via Deja.com
> http://www.deja.com/



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

Date: Sun, 21 Jan 2001 19:04:00 +0000
From: Jason Clifford <jason@uklinux.net>
Subject: Re: matching "*"?
Message-Id: <Pine.LNX.4.30.0101211902150.24374-100000@ns1>

On Sun, 21 Jan 2001, Johannes Graumann wrote:

> I'm trying to match a "*" at the end of a line. Since * is a multiplier,
> something like /*^/ won't work.

^ is for matching at the beginning of a line. You need to use $ to match
at the end of a line.

You can escape meta characters by prepending \ to them so:

/\*$/ will match "*" at the end of a line.

Jason Clifford



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

Date: 21 Jan 2001 14:46:42 GMT
From: tarael200@aol.com (Tarael200)
Subject: Re: Perl Crashes on my Win2k Box
Message-Id: <20010121094642.10290.00000429@ng-mf1.aol.com>

Jeez, seems like we're beating the newbies off with a spoon lately..

Try posting your code next time.

And telling us what version of perl you're using.

And just being a bit more verbose in describing your problem, in general.

-Malander



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

Date: Sun, 21 Jan 2001 15:38:39 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Posting Guidelines (Re: Perl  - Bytecode, Compile to C, Perl2EXE)
Message-Id: <slrn96lkj3.gb2.tadmc@tadmc26.august.net>

Jeffrey Grace <gracenews@optusnet.com.au> wrote:

><ASIDE> Is there an official or semi-official site with the rules of this
>newsgroup and appropriate links.  That way instead of insulting someone when
>they post a first post you can point them to the site (and ask them
>_politely_ to repost when they have read the rules).  I don't see what being
>nasty or sarcastic achieves besides generating multiple perl un-related
>posts as for example this thread does.   (BTW I'm _not_ blaming anyone, just
>suggesting a way to cut down on these sorts of threads.)  Hell if an
>old-timer (meant fondly of course ;-) ) would like to post or email me the
>rules, I'll do up a quick web page on yahoo or similar. </END ASIDE>


I acted as secretary for hashing out some guidelines here in 
clpmisc last month. The first thread was:

   http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=704049624&fmt=text


I am currently working with the Perl Mongers to get the autoposting
started, and for web space for the Guidelines in various formats. 
Sorry it is taking so long (it is a volunteer thing you see).

Until that gets worked out they are available on my personal web site:

   http://www.augustmail.com/~tadmc/clpmisc_guide/


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 21 Jan 2001 15:38:40 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Posting Guidelines (was Re: Perl - Bytecode, Compile to C, Perl2EXE)
Message-Id: <slrn96lnto.gb2.tadmc@tadmc26.august.net>

Jeffrey Grace <gracenews@optusnet.com.au> wrote:
>"jbuff" <jbuff1856@my-deja.com> wrote in message
>news:94eapf$5ak$1@nnrp1.deja.com...
>>
>> Tad McClellan has graciously provided me with a copy of the lastest
>> revision of the comp.lang.perl.misc posting guidelines, which I have
>> posted at http://www.jbuff.org/clpmisc_guidelines.htm .
>>
>> They are not quite official, but I will redirect to the official site
>> when it is available.
>>
>> --jbuff
>
>May I make a small suggestion?  


Not now and not it this thread.

When it is autoposted you can make a suggestion here in a thread
rooted at the autopost  :-)

We had discussion last month. Discussion is closed until it
starts being autoposted.


[ but when discussion _does_ open keep in mind that we must be
  ruthless in maintaining a relatively small size. We don't have
  much wiggle room. To add new stuff, it would need to be More
  Important than some existing point, so we can delete a point
  to make room for the new one.
]


>Since this will be read by a high volume of
>Perl newbies, maybe some examples should be provided on how they can read
>the FAQ and pod documentation (eg: perldoc...)


That would be repeating things that are already available.

Folks get an automatic email in response to their first posting here,
it covers some of the things you suggest.

(mungers probably don't receive it, but getting less help is a
 tradeoff you agree to when you decide to munge.

 not seeing the intro message means mungers are likely to reask
 FAQs and whatnot, which is why some scorefiles mark down mungers.
)


I may add a link to Tom Christiansen's 'perlrtfm' 
("How to Research The Fabulous Perl Manual") when it is
finished and available at a stable URL.

There is an inwork version at (really long URL wrapped for posting):

   http://www.xray.mpe.mpg.de/cgi-bin/extract-mbox/perl5-porters/2000-05?
     25048%2E957207786%40chthon


>In the other resource section maybe a couple of links to large sites would
>be helpful (preferably large sites that have existed for a while so that
>maintaining the links doesn't become a problem) eg www.perldoc.com.


The two very first points address checking the standard docs,
so new posters should already know that that is required.

Pointing them to a place "out on the web" that has the exact same
info as is already on their own hard disk seems roundabout.

I should probably add "perldoc perldoc" in there somewhere though.
Please mention that again when the autopost starts showing up.


>Also in the before posting section, maybe you could remind them about common
>lines that they should use, 


Did you see the "Do not expect people to do a machine's work" section?


>such as:
>#! /bin/usr/perl -Tw
>use Strict;
     ^

We wouldn't want to include code with syntax errors though :-)

Tainting is not universally applicable (eg. programs that don't take
external input), so that shouldn't be in there.


>Or if they are writing a CGI script use:
>use CGI::Carp qw(fatalsToBrowser);  (I could see this one cutting down a few
>posts)


No, I will resist to the end adding anything specific to an
application area that Perl might be used in. Perl is used in
lots and lots of places, which ones deserve coverage and which
ones don't?

If we don't do application-specific stuff, then we don't need
to wrestle with the answer to that question. Laziness in action!



Checking the Perl FAQ would cut down on the number of posts too,
it just does not happen as it should :-(

   perldoc -q CGI

      "How can I get better error messages from a CGI program?"


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 21 Jan 2001 15:06:54 GMT
From: simberg.interglobal@trash.org (Rand Simberg)
Subject: Still Can't Get MIME Lite To Send Attachment...
Message-Id: <3a6bfa16.224465766@nntp.ix.netcom.com>

On Fri, 19 Jan 2001 20:07:05 GMT, in a place far, far away,
simberg.interglobal@trash.org (Rand Simberg) made the phosphor on my
monitor glow in such a way as to indicate that:

I still can't get MIME Lite to actually attach a file.  When I run the
following:

$msg = new MIME::Lite
                                From    =>$mailer,
                                To      =>$recipient,
                                Subject =>'Contact Record Archive',
                                Type    =>'multipart/mixed';

                        # Add parts (each "attach" has same arguments
as "new"):
                        attach $msg
                                Type     =>'TEXT',
                                Data     =>"The attached file contains
your requested archive backup.";
 	           attach $msg
                                Type     =>'text/plain',
                                Path     =>"$data_directory/$file",

                        $msg->send;

I get an email message with the following body:

******************************************************************

Content-Disposition: inline
Content-Length: 57
Content-Transfer-Encoding: binary
Content-Type: text/plain

The attached file contains your requested archive backup. 
*******************************************************************

But still no attachment.  AFAIK, the path is valid.  Does anyone have
any idea what the problem might be?

************************************************************************
simberg.interglobal.org  * 310 372-7963 (CA) 307 739-1296 (Jackson Hole)  
interglobal space lines  * 307 733-1715 (Fax) http://www.interglobal.org 

"Extraordinary launch vehicles require extraordinary markets..."
Replace first . with @ and throw out the "@trash." to email me.  
Here's my email address for autospammers: postmaster@fbi.gov


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

Date: Sun, 21 Jan 2001 15:04:48 GMT
From: mintcake@my-deja.com
Subject: Thread limit (12) on WIN32
Message-Id: <94etqd$hka$1@nnrp1.deja.com>

I have built two versions of perl on Win32 (NT4) from source; one using
the 5005THREADS option and the other using ITHREADS.  Both suffer from
the same problem: I cannot create more than 11 extra threads.

I'm using Thread->new() in the 5005THREADS case and a simple fork()
with the ITHREADS build.

Any ideas


Sent via Deja.com
http://www.deja.com/


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

Date: Sun, 21 Jan 2001 15:38:40 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: X-FILES problem
Message-Id: <slrn96lpla.gb2.tadmc@tadmc26.august.net>

MaxyM <marekpow@email.hinet.hr> wrote:
>Ok, problem goes like this:


I do not see any problem, things appear to be as they should be.


>1.) On my web page code is:
><input type="text" name="nas"..etc..>
>
>But if you write John Janson for example, then in Perl I get
>
>John+Janson ??


Right, the response is encoded.


>So, the problem is +. This sign is printed on every place where should be
>space and the
>user did not hit this key.


You need to decode it.

Use the CGI.pm module, it decodes the form elements for you automatically.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 111
**************************************


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