[18373] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 541 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 21 14:06:29 2001

Date: Wed, 21 Mar 2001 11:05:21 -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: <985201521-v10-i541@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 21 Mar 2001     Volume: 10 Number: 541

Today's topics:
    Re: &nbsp being replaced by space?? <iltzu@sci.invalid>
    Re: &nbsp being replaced by space?? <bart.lateur@skynet.be>
    Re: [RFC] A proposal for changes to Net::Ping <bowman@montana.com>
    Re: [RFC] A proposal for changes to Net::Ping <djberge@uswest.com>
    Re: [RFC] A proposal for changes to Net::Ping <bitbucket@jenovaproject.org>
        Beginner's question <myers@infinet.com>
    Re: Beginner's question <dave@dave.org.uk>
    Re: Can't combine > and $ <jrk@sys.uea.ac.uk>
    Re: files in a directory <iltzu@sci.invalid>
    Re: form post parameter looks like directory but is a s d.lebbing@*no*spam*.iquip.nl
    Re: form post parameter looks like directory but is a s <iltzu@sci.invalid>
    Re: form post parameter looks like directory but is a s (Heiner Marxen)
        h2xs recursive failure in assign_typemap_entry davidz@carterz.net
    Re: Hash Problem Solved <jason.baker@stdbev.com>
        how do you pass arguements into the "do" command? (David)
        How safe is Safe? (Kevin Reid)
        How to retrieve print statements from a trigger in Perl (Jane Curtin)
    Re: How to retrieve print statements from a trigger in  <dave@dave.org.uk>
        i'm going a bit loopy <jhall@ifxonline.com>
    Re: Is a function/class library for processing of SMTP- lvirden@cas.org
        long regex <ducateg@info.bt.co.uk>
    Re: long regex (Anno Siegel)
        MS excel spreadsheet / DBF format files <alan@scotlpuk.com>
    Re: MS excel spreadsheet / DBF format files (John McNamara)
    Re: MS excel spreadsheet / DBF format files <alan@scotlpuk.com>
    Re: MS excel spreadsheet / DBF format files <alan@scotlpuk.com>
        Newbie Question re: Webget <axeman@hfx.eastlink.ca>
        persistent cookie working with Netscape4.7x, not IE5x? <m.grimshaw@salford.ac.uk>
    Re: persistent cookie working with Netscape4.7x, not IE <jhall@ifxonline.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 21 Mar 2001 16:32:28 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: &nbsp being replaced by space??
Message-Id: <985192133.23800@itz.pp.sci.fi>

In article <3ab84cbb.572681187@news3.mylinuxisp.com>, cRYOFAN wrote:
>	I am losing part of my regex, namely the "&nbsp" part when I
>use my file manager to FTP (?) my perl cgi script up to my website.
>ANy clues?

Is this "file manager" a web form?  If so, the script that generates the
form is broken.  The question really has nothing to do with Perl, unless
of course the broken script is written in Perl, in which case the answer
is to use escapeHTML() from CGI.pm or any other equivalent function.

It doesn't sound like it has anything to do with FTP either, even though
switching to FTP might be a solution.  Ask your webspace provider.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: Wed, 21 Mar 2001 17:04:37 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: &nbsp being replaced by space??
Message-Id: <jqnhbtojs4p7ap54vtlaf7b1fh70m2mgk9@4ax.com>

cRYOFAN wrote:

>	I am losing part of my regex, namely the "&nbsp" part when I
>use my file manager to FTP (?) my perl cgi script up to my website.
>ANy clues?

Maybe it's not a space. Maybe it's a chr(160), which LOOKS like a space.

-- 
	Bart.


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

Date: Wed, 21 Mar 2001 08:13:31 -0700
From: "bowman" <bowman@montana.com>
Subject: Re: [RFC] A proposal for changes to Net::Ping
Message-Id: <HV2u6.102$SK4.1121@newsfeed.slurp.net>


Colin McMillen <bitbucket@jenovaproject.org> wrote in message
news:999mf2$8o6$1@laurel.tc.umn.edu...
>
> The following is a request for comments on a list of proposed changes
> to the Net::Ping module.

I don't know if this is applicable, but I'll throw it out for general
infomation. On Windows NT, Users, by default could not use raw sockets for
TCP. The same situation exists on *nix, where some pings must suid to root.
On NT, a Registry hack would allow Users access.

On Win2000, I have not been able to reliably open up raw socket usage for
Users. The Registry hack does not seem to work anymore. I had to wrap the MS
ping for a tools we use to find various RPC apps on the net.





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

Date: Wed, 21 Mar 2001 08:38:21 -0600
From: Daniel Berger <djberge@uswest.com>
Subject: Re: [RFC] A proposal for changes to Net::Ping
Message-Id: <3AB8BCDD.5ADBD29F@uswest.com>

> The following is a request for comments on a list of proposed changes
> to the Net::Ping module. After doing some basic searching of the web,
> and taking a look at the actual source code, I've come up with a list
> of problems and changes that I am interested in implementing. I would
> appreciate any comments or suggestions you may have on this
> matter.

<snip>

Hooray!  Someone is going to fix this module!

>
> - Summary -
>
> Already implemented changes:
> 1. Removal of alarm() function
> 2. TCP ping now functional on MSWin32 systems
> 3. Incorrect returns of "false" removed from TCP ping
> 4. Removal of unneeded warning in the module's POD

Excellent!

>
> To be (possibly) implemented:
> 5. Creation of a new "external" protocol
> 6. Creation of a new "auto" protocol
> 7. Documentation update

Agree with these!

>
> 8. Change in the default ping protocol

Agree with this as well.  As for concerns about "breaking" old scripts I say "tough cookies".  First, your ("auto") default
makes more sense.  Second, there is no one holding a gun to any Perl programmer's head forcing them to upgrade to your
version.  Third, it probably won't cause problems anyway.

>
> 9. Allowing for user-specified port in TCP ping

Agree.

>
> 10. UDP ping fixes?

Don't know enough about it to comment.

I was having trouble with this module about a month back.  The replies to my post on this newsgroup effectively amounted to
"don't use Net::Ping".  I'm glad to see that someone is taking the time and effort to fix this!

Sincerely,

Daniel Berger


--
"Evil will always triumph because Good is *dumb*"

- Dark Helmet, Spaceballs





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

Date: Wed, 21 Mar 2001 09:10:38 -0600
From: Colin McMillen <bitbucket@jenovaproject.org>
Subject: Re: [RFC] A proposal for changes to Net::Ping
Message-Id: <99ag94$b2h$1@laurel.tc.umn.edu>

bowman wrote:

>> The following is a request for comments on a list of proposed changes
>> to the Net::Ping module.
> 
> I don't know if this is applicable, but I'll throw it out for general
> infomation. On Windows NT, Users, by default could not use raw sockets for
> TCP. The same situation exists on *nix, where some pings must suid to
> root. On NT, a Registry hack would allow Users access.

I'm aware that problems like this exist. Unfortunately, I know very little 
about WinNT details (such as registry hacks), and have no readily available 
boxes to test anything on. If you or anyone else would want to twiddle with 
the module to get the various pinging methods to work, that'd be great.

I don't think there's any easy way to get native ICMP ping for non-root 
users in WinNT.  That's why I've created Net::Ping::External.

Net::Ping uses Socket.pm to do the connect() for TCP ping... does Socket.pm 
work in Win2000?
 
> On Win2000, I have not been able to reliably open up raw socket usage for
> Users. The Registry hack does not seem to work anymore. I had to wrap the
> MS ping for a tools we use to find various RPC apps on the net.

This wrapper of the MS ping is exactly what the proposed "external"  and/or 
"auto" protocols would do.  If you'd like to help me quite a bit, download 
Net::Ping::External from CPAN, run the test suite, and send me the results. 

- Colin McMillen



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

Date: Wed, 21 Mar 2001 13:37:33 -0500
From: Jeff Myers <myers@infinet.com>
Subject: Beginner's question
Message-Id: <3ab8f3e0$0$53493$f5f63664@news.tdin.com>

This is guaranteed (?) to be trivial for any of you..... but maddening for me.

This script below (run in MacPerl) generates a "can't use an undefined value as a symbol reference"
error in the last line.
Why? It's pretty much like an early program in _Learning Perl_.

%words = qw(
fred camel
barney llama
betty alpaca
wilma alpaca
);

$temp = "betty";
print $words($temp);





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

Date: Wed, 21 Mar 2001 18:59:28 +0000
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Beginner's question
Message-Id: <4euhbtcnr296sr8mm4lfbgiuhi3cnhrhec@4ax.com>

[Please try to use more descriptive subjects fot your posts]

On Wed, 21 Mar 2001 13:37:33 -0500, Jeff Myers <myers@infinet.com>
wrote:

>This is guaranteed (?) to be trivial for any of you..... but maddening for me.
>
>This script below (run in MacPerl) generates a "can't use an undefined value as a symbol reference"
>error in the last line.
>Why? It's pretty much like an early program in _Learning Perl_.
>
>%words = qw(
>fred camel
>barney llama
>betty alpaca
>wilma alpaca
>);
>
>$temp = "betty";
>print $words($temp);

Double check the types of brackets in that last line. They probably
want to be braces - {} - not parentheses - ().

hth,

Dave...

-- 
<http://www.dave.org.uk>  SMS: sms@dave.org.uk
<http://www.manning.com/cross/>


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

Date: 21 Mar 2001 18:15:05 GMT
From: Richard Kennaway <jrk@sys.uea.ac.uk>
Subject: Re: Can't combine > and $
Message-Id: <99ar39$l3m$1@cpca14.uea.ac.uk>

In article <E0Ps6.73$ez4.3092@eagle.america.net> Garry Williams,
garry@zvolve.com writes:
> open(OUT, ">$_/scripts/make_mask.txt")
>     || die "can't open $_/scripts/make_mask.txt: $!\n";

The three-argument version of open would be better:

    open(OUT, ">", "$_/scripts/make_mask.txt")

With two arguments, I'd worry about $_ beginning with a character that
open() will read as part of the mode.  Two-argument open provides some
magic stuff you don't get with three arguments, but it isn't applicable
to the present example.

-- Richard Kennaway, jrk@sys.uea.ac.uk, http://www.sys.uea.ac.uk/~jrk/
   School of Information Systems, Univ. of East Anglia, Norwich, U.K.


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

Date: 21 Mar 2001 16:18:35 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: files in a directory
Message-Id: <985191180.22030@itz.pp.sci.fi>

In article <87k85krkud.fsf@limey.hpcc.uh.edu>, Tony Curtis wrote:
>>> On Tue, 20 Mar 2001 21:39:15 GMT,
>>> "Waarddebon" <Waarddebon@chello.nl> said:
>
>> How to place all files in a given directory in a string
>
>Do you mean the names of the files, or the contents of the
>files?

Aren't the problems mostly equivalent?

  $_ = `cat $_`;

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: Wed, 21 Mar 2001 14:22:45 GMT
From: d.lebbing@*no*spam*.iquip.nl
Subject: Re: form post parameter looks like directory but is a script ?!
Message-Id: <3ab8b42e.3383575@news.euronet.nl>

On Wed, 21 Mar 2001 14:39:15 +0100, Malte Ubl <ubl@schaffhausen.de>
wrote:

>d.lebbing@*no*spam*.iquip.nl schrieb:
>> 
>> Folks,
>> 
>> The folowing situation is uncomprehenseble to me and I need to know
>> how this works.
>> 
>> A script is beeing called from a form like:
>> <form action="/secured/edit/article.cgi/3ab8a09e077a0001" method=POST
>> -->
>> This is special because article.cgi is the script and it takes
>> 3ab8a09e077a0001 as a parameter!  I am puzzled, does anyone have any
>> idea to enlighten me on this one?  What is the trick?
>
>Is that a Perl script?

Yes, article.cgi is a perl script.  

Here I have a working form/script situation and I want to duplicate it
to make an other application.
The original application works fine but in the new situation (also a
diferent directory) I get the error:
"Not Found
The requested URL /secured/vac_cm/vacature.cgi/3ab8b8cb07d50001 was
not found on this server."




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

Date: 21 Mar 2001 16:42:32 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: form post parameter looks like directory but is a script ?!
Message-Id: <985192680.24572@itz.pp.sci.fi>

In article <3ab8b42e.3383575@news.euronet.nl>, d.lebbing@*no*spam*.iquip.nl wrote:
>
>Here I have a working form/script situation and I want to duplicate it
>to make an other application.
>The original application works fine but in the new situation (also a
>diferent directory) I get the error:
>"Not Found
>The requested URL /secured/vac_cm/vacature.cgi/3ab8b8cb07d50001 was
>not found on this server."

Okay, so what happens when you try it without the extra path info?
(Hint: Those are keywords.  Search for them.)  That is, try removing
everything after ".cgi" from the URL and see what message you'll get.
If it's the same error, the problem is something else entirely.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: Wed, 21 Mar 2001 18:17:02 GMT
From: heiner@DrB.Insel.DE (Heiner Marxen)
Subject: Re: form post parameter looks like directory but is a script ?!
Message-Id: <GAK84E.HCp@DrB.Insel.DE>

In article <3ab89f9c.89011191@news.euronet.nl>,
 <d.lebbing@*no*spam*.iquip.nl> wrote:
>Folks,
>
>The folowing situation is uncomprehenseble to me and I need to know
>how this works.  
>
>A script is beeing called from a form like:
><form action="/secured/edit/article.cgi/3ab8a09e077a0001" method=POST
>-->
>This is special because article.cgi is the script and it takes
>3ab8a09e077a0001 as a parameter!  I am puzzled, does anyone have any
>idea to enlighten me on this one?  What is the trick?

This is actually not a perl question, but is about the http demon.
With Apache the above works this way:

When scanning the URL, the server detects, that the prefix
"/secured/edit/article.cgi" is an CGI program, which is configured to
be executable.  It does set up this program with (among others)
two environment variables:

SCRIPT_NAME	the above prefix, i.e.	"/secured/edit/article.cgi"
PATH_INFO	the rest, i.e.		"/3ab8a09e077a0001"

The CGI program then can use the PATH_INFO to decide for some subfunction.
This is a nice form of parameter passing, an alternative to "?name=value".

Whether this is specific to Apache I don't know.
-- 
Heiner Marxen	heiner@drb.insel.de	http://www.drb.insel.de/~heiner/


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

Date: 21 Mar 2001 18:52:34 GMT
From: davidz@carterz.net
Subject: h2xs recursive failure in assign_typemap_entry
Message-Id: <99at9i$7hd$1@news.netmar.com>

I'm trying to create a "better" Perf::ARM module. ARM is a cross-platform
industry-std API for transaction response time measurement. Vendors supply
various ARM libraries (libarm.sl, libarm32.dll, etc.).  Current version of
Perf::ARM (0.03) is an extremely "light" XS wrapper. I plan to produce
a version with "full" XS capabilities, and (maybe) a later version with a more
"OO" interface.

I've studied all the XS-related manpages, and think I have a fairly good
handle on what I'm trying to do.

>$ perl -v
>This is perl, v5.6.1 built for cygwin
>(with 1 registered patch, see perl -V for more detail)

Command I'm trying to run:
>h2xs -Oaxn Perf::ARM -F "-D_PROTOTYPES" -M'^(ARM_|arm_){1}[A-Za-z]+[a-z]' -v
>0.04 arm.h -larm 

You can see arm.h here:  http://www.cmg.org/regions/cmgarmw/sdk/arm201.h

Problem #1:
C::Scan dies. Complains about missing parens, after "panic"ing many
times about missing commas.
Work-around: I prevent arm.h from #including <windows.h>. Doesn't seem
to cause any problems under cygwin. 

Problem #2:
Now it runs for a looong while, and then dies with:

>Overwriting existing Perf/ARM!!!
>Scanning typemaps...
> Scanning /usr/lib/perl5/5.6.1/ExtUtils/typemap
>Scanning arm.h for functions...
>Scanning arm.h for typedefs...
>Writing Perf/ARM/ARM.pm
>Writing Perf/ARM/ARM.xs
>Writing Perf/ARM/typemap
>Out of memory during "large" request for 266240 bytes, total
sbrk() is
>265283584 bytes at /usr/bin/h2xs line 1607.


Debugging under the perl debugger, I find that at line 1645 (first time
through) %types_seen contains 27 entries:

>main::(/bin/h2xs:1645):   for $type (sort keys %types_seen) {
>  DB<2> x sort keys %types_seen
>0  '_types_fd_set'
>1  '_types_fd_set *'
>2  'arm_app_correlator_t'
>3  'arm_app_correlator_t *'
>4  'arm_bit8_t'
>5  'arm_cntrdivr32_t'
>6  'arm_cntrdivr32_t *'
>7  'arm_gaugedivr32_t'
>8  'arm_gaugedivr32_t *'
>9  'arm_int16_t'
>10  'arm_int32_t'
>11  'arm_int64_t'
>12  'arm_unsigned32_t'
>13  'arm_unsigned64_t'
>14  'arm_user_data101_t'
>15  'arm_user_data101_t *'
>16  'arm_user_data1_t'
>17  'arm_user_data1_t *'
>18  'arm_user_data2_t'
>19  'arm_user_data2_t *'
>20  'arm_user_meta101_t'
>21  'arm_user_meta101_t *'
>22  'arm_user_metric1_u'
>23  'arm_user_metric1_u *'
>24  'fd_mask'
>25  'struct _types_fd_set { fd_mask fds_bits [ ( ( ( 64 ) + ( ( ( sizeof (
>fd_mask ) * 8 ) ) - 1 ) ) / ( ( sizeof ( fd_mask ) * 8 ) ) ) ] ; }'
>26  'struct _types_fd_set { long fds_bits [ ( ( ( 64 ) + ( ( ( sizeof (
>long
) * 8 ) ) - 1 ) ) / ( ( sizeof ( long ) * 8 ) ) ) ] ; }'

Stepping through h2xs, all goes well processing these %types_seen entries,
until it hits type # 16, 'arm_user_data1_t', which is defined in arm.h as:

>typedef struct arm_user_data1_t {
>    arm_int32_t          format;        /*  Version/format id (userdata_e)

*/
>    arm_bit8_t           flags[4];      /*  Flags for metrics' presence 
*/
>    arm_user_metric1_u   metric[6];     /*  User metrics  */
>    char                 string32[32];  /*  32 byte non-terminated string 
*/
>    arm_app_correlator_t correlator;    /*  Correlator  */
>} arm_user_data1_t;

Stack trace shows that we're in what appears to be an infinite loop,
recursively calling sub 'assign_typemap_entry' from line 1616 in that sub.
I'm not 100% certain, but it appears that $type is being continuously
appended to.

What's different about this struct from the others in %types_seen that we've
already processed? Only thing I see is that it contains union
arm_user_metric1_u, which appears later in the (sorted) list %types_seen.

Any thoughts as to what's going on here, and what I can do to fix it?

Also, it seems curious to me that _types_fd_set, 2 related structs, and
fd_mask appear in %types_seen. Should they be there?

Thanks for any help you can provide.
-David






 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: Wed, 21 Mar 2001 10:32:29 -0600
From: "Jason" <jason.baker@stdbev.com>
Subject: Re: Hash Problem Solved
Message-Id: <tbhm12p34713bc@news.supernews.com>

As it turns out, we werent losing the hash at all.  We had a typo calling
adding to the hash, so only the final entry was every recorded.   Thats what
we get for coding in the a.m.   Thank you all for your help.





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

Date: Wed, 21 Mar 2001 16:22:02 GMT
From: dsedrich@yahoo.com (David)
Subject: how do you pass arguements into the "do" command?
Message-Id: <3ab8d39e.7380609@news>

I'm trying to pass an arguement into a perl program that I am
executing from another Perl program. I try:

do "program.plx data1";

It doesn't work. It doesn't do anything that I can see.

do "program.plx";

works fine, but doesn't accomplish what I want.

Can you pass arguements in with the "do" command?
Is there a simple way to accomplish this otherwise?

I've tried within a program:

system("perl program.plx data1");

This worked when in the Perl directory from the command line but did
NOT work when I tried to execute it from a web page. Don't know the
reason but I assume it has something to do with the environment.  I'd
like to know how to make this work as well. Can't identify the
environment element that is relevant here. 

I'd appreciate any help. -- Dave (dsedrich@yahoo.com)


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

Date: Wed, 21 Mar 2001 11:42:37 -0500
From: kpreid@attglobal.net (Kevin Reid)
Subject: How safe is Safe?
Message-Id: <1eq5x2z.tpekt179z036N%kpreid@attglobal.net>

Is the Safe module secure enough to allow execution of arbitrary code
with no danger except resource usage (memory/processor)?

This question applies to Perl versions 5.004 and up.

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.


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

Date: Wed, 21 Mar 2001 16:37:02 GMT
From: curtin@ims.nci.nih.gov (Jane Curtin)
Subject: How to retrieve print statements from a trigger in Perl.
Message-Id: <OM4u6.129$jg.356041@mencken.net.nih.gov>

I'm working with DBI Perl using a Sybase database.  I need to get back the 
print statements that are in a trigger so that I can print them back to the 
user of the Web page.  How do I get the print statements into my Perl code? 
Thanks in advance.


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

Date: Wed, 21 Mar 2001 18:54:50 +0000
From: Dave Cross <dave@dave.org.uk>
Subject: Re: How to retrieve print statements from a trigger in Perl.
Message-Id: <74uhbto2sd3s82qt5ge04prp5b19s062mo@4ax.com>

On Wed, 21 Mar 2001 16:37:02 GMT, curtin@ims.nci.nih.gov (Jane Curtin)
wrote:

>I'm working with DBI Perl using a Sybase database.  I need to get back the 
>print statements that are in a trigger so that I can print them back to the 
>user of the Web page.  How do I get the print statements into my Perl code? 

print statements get sent to your message handler function with a
severity of zero. You'll have to write a message handler callback
function and install it before running any statements that use print.
Details of how to do this are in the docs that come with DBD::Sybase.

hth,

Dave...

-- 
<http://www.dave.org.uk>  SMS: sms@dave.org.uk
<http://www.manning.com/cross/>


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

Date: Wed, 21 Mar 2001 18:42:56 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: i'm going a bit loopy
Message-Id: <QC6u6.55127$o7.2391214@news1.rdc1.sdca.home.com>


For $value, why does this work:

_____________________________________________________
sub do_adminedsearch {

    open_infile($searchcrit);

    dbmopen(%sitedb,"$datadir/$sitedb", 0644) or die "dbmopen: $!";
    dbmopen(%permdb,"$datadir/$permdb", 0644) or die "dbmopen: $!";
    @usrkeys = keys(%permdb);

    $value = $sitedb{user1};

    for ($i=0;$i<@usrkeys;$i++) {

        unless ($usrkeys[$i] eq '_ADMINPW_' || $usrkeys[$i] eq '_ADMIN_' ||
$usrkeys[$i] eq '_SECTIONS_') {

        $list .= <<HTML;

        stuff, including $value

HTML
        }

        untie %permdb;
        untie %sitedb;
        $content=~s/<--MESSAGE-->/$list/;
    }

}

_____________________________________________________
But this DOESN'T!!??!??:
_____________________________________________________
sub do_adminedsearch {

    open_infile($searchcrit);

    dbmopen(%sitedb,"$datadir/$sitedb", 0644) or die "dbmopen: $!";
    dbmopen(%permdb,"$datadir/$permdb", 0644) or die "dbmopen: $!";
    @usrkeys = keys(%permdb);

    for ($i=0;$i<@usrkeys;$i++) {

        unless ($usrkeys[$i] eq '_ADMINPW_' || $usrkeys[$i] eq '_ADMIN_' ||
$usrkeys[$i] eq '_SECTIONS_') {

        $value = $sitedb{user1};

        $list .= <<HTML;

        stuff, including $value

HTML
        }

        untie %permdb;
        untie %sitedb;
        $content=~s/<--MESSAGE-->/$list/;
    }

}
_____________________________________________________


When it's working I want $value to be $sitedb{"$usrkeys[$i]"}; so it needs
to be inside the for loop...

Thanks for any assistance.





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

Date: 21 Mar 2001 15:00:49 GMT
From: lvirden@cas.org
Subject: Re: Is a function/class library for processing of SMTP-mails available?
Message-Id: <99afn1$f7g$1@srv38.cas.org>


:So as you see you need procmail to achieve what you want to do.

It would be more accurate to say "procmail is one of a wide variety of
programs intended to achieve what you want to do, and it is the one
with which I am most (only?) familar..."

There are plenty of other applications, as well as modules/extensions/whatever
for rolling your own.

-- 
-- 
"See, he's not just anyone ... he's my son."  Mark Schultz
<URL: mailto:lvirden@cas.org> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting


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

Date: Wed, 21 Mar 2001 14:29:51 -0000
From: "Géry" <ducateg@info.bt.co.uk>
Subject: long regex
Message-Id: <99ae61$mjj$1@pheidippides.axion.bt.co.uk>

Has anyone tried to process 300 character long regex. I seem to have some
troubles performing simple regex matches on long variables.

so if $foo is a 300 characters long string (effectively a url with all sorts
of characters inc % ; ? ...)
is it a problem to try:

while (<FOOFILE>)
{
  $boolean = 1 if (/$foo/);
}

where the idea is obviously to try and find out if the file contains $foo...

I am very puzzled  by this one because I know that $_ effectively becomes
equal to $foo at some point (I logged it) but the loop does not pick it up.
That is why I am asking if the length can be a problem...

thanks in advance

--
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Géry Ducatel
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<





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

Date: 21 Mar 2001 15:05:24 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: long regex
Message-Id: <99afvk$luf$1@mamenchi.zrz.TU-Berlin.DE>

According to Géry <ducateg@info.bt.co.uk>:
> Has anyone tried to process 300 character long regex. I seem to have some
> troubles performing simple regex matches on long variables.
> 
> so if $foo is a 300 characters long string (effectively a url with all sorts
> of characters inc % ; ? ...)
> is it a problem to try:
> 
> while (<FOOFILE>)
> {
>   $boolean = 1 if (/$foo/);
> }
> 
> where the idea is obviously to try and find out if the file contains $foo...
> 
> I am very puzzled  by this one because I know that $_ effectively becomes
> equal to $foo at some point (I logged it) but the loop does not pick it up.
> That is why I am asking if the length can be a problem...

Not the length, but very probably the funny characters you mention.
Look up quotemeta in perlfunc and the \Q escape.

Anno


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

Date: Wed, 21 Mar 2001 16:31:34 -0000
From: "Alan Fleming" <alan@scotlpuk.com>
Subject: MS excel spreadsheet / DBF format files
Message-Id: <nE4u6.15750$Q4.2949846@news2-win.server.ntlworld.com>

I have currently got a perl CGI program outputting text to a CSV file, which
is just a comma delimeted text file.  Is there any way I can adapt this so
that a proper .xls file is produced?  If not, are there simple convertors
for writing to a DBF (D-base) file?

Any help appreciated.

Alan






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

Date: Wed, 21 Mar 2001 17:17:10 GMT
From: jmcnamara@cpan.org (John McNamara)
Subject: Re: MS excel spreadsheet / DBF format files
Message-Id: <3ab8e173.277058@News.CIS.DFN.DE>

Ar Wed, 21 Mar 2001 16:31:34 -0000, do schriobh Alan Fleming:

>I have currently got a perl CGI program outputting text to a CSV file, which
>is just a comma delimeted text file.  Is there any way I can adapt this so
>that a proper .xls file is produced?  If not, are there simple convertors
>for writing to a DBF (D-base) file?

Have a look at the Spreadsheet::WriteExcel module:

    http://search.cpan.org/search?dist=Spreadsheet-WriteExcel

If that doesn't do what you want there are some suggestions of other
ways to create Excel files in the documentation.

John.
-- 
"Language is a virus from outer space"
                 William S. Burroughs



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

Date: Wed, 21 Mar 2001 17:23:09 -0000
From: "Alan Fleming" <alan@scotlpuk.com>
Subject: Re: MS excel spreadsheet / DBF format files
Message-Id: <Do5u6.15859$Q4.2968956@news2-win.server.ntlworld.com>

Thanks, I'll have a look.  I tried searching CPAN earlier, but the excel
option had no link.

Cheers
Alan
"John McNamara" <jmcnamara@cpan.org> wrote in message
news:3ab8e173.277058@News.CIS.DFN.DE...
> Ar Wed, 21 Mar 2001 16:31:34 -0000, do schriobh Alan Fleming:
>
> >I have currently got a perl CGI program outputting text to a CSV file,
which
> >is just a comma delimeted text file.  Is there any way I can adapt this
so
> >that a proper .xls file is produced?  If not, are there simple convertors
> >for writing to a DBF (D-base) file?
>
> Have a look at the Spreadsheet::WriteExcel module:
>
>     http://search.cpan.org/search?dist=Spreadsheet-WriteExcel
>
> If that doesn't do what you want there are some suggestions of other
> ways to create Excel files in the documentation.
>
> John.
> --
> "Language is a virus from outer space"
>                  William S. Burroughs
>




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

Date: Wed, 21 Mar 2001 17:33:26 -0000
From: "Alan Fleming" <alan@scotlpuk.com>
Subject: Re: MS excel spreadsheet / DBF format files
Message-Id: <jy5u6.15880$Q4.2975366@news2-win.server.ntlworld.com>

Ooh, the author - very impressed.  I'm honoured....yeah. :)

Alan
"John McNamara" <jmcnamara@cpan.org> wrote in message
news:3ab8e173.277058@News.CIS.DFN.DE...
> Ar Wed, 21 Mar 2001 16:31:34 -0000, do schriobh Alan Fleming:
>
> >I have currently got a perl CGI program outputting text to a CSV file,
which
> >is just a comma delimeted text file.  Is there any way I can adapt this
so
> >that a proper .xls file is produced?  If not, are there simple convertors
> >for writing to a DBF (D-base) file?
>
> Have a look at the Spreadsheet::WriteExcel module:
>
>     http://search.cpan.org/search?dist=Spreadsheet-WriteExcel
>
> If that doesn't do what you want there are some suggestions of other
> ways to create Excel files in the documentation.
>
> John.
> --
> "Language is a virus from outer space"
>                  William S. Burroughs
>




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

Date: Wed, 21 Mar 2001 11:25:25 -0400
From: "Roger Howse" <axeman@hfx.eastlink.ca>
Subject: Newbie Question re: Webget
Message-Id: <8L3u6.163284$Z2.2015463@nnrp1.uunet.ca>

Hi Folks,

I am no Perl genius and am having trouble formulating a call to webget.pl.
Can someone clue me in as to the proper syntax to nab a web page to a file
called exchange.htm? Sure would appreciate it.

--
"If I had no sense of humor, I would long ago have committed suicide" -
Gandhi




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

Date: Wed, 21 Mar 2001 18:43:40 +0000
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: persistent cookie working with Netscape4.7x, not IE5x?
Message-Id: <3AB8F65C.D8A430C8@salford.ac.uk>

Using the Set-Cookie header within a perl script, I can set and get
persistent cookies with Netscape.

With IE5, I can set the cookie (i.e. I can see and read the cookie on my
client hard drive) but cannot get the cookie back.

Netscape properly sends the HTTP_COOKIE environmental back to the perl
script from which I can retrieve the state information.

IE5 does not sent HTTP_COOKIE at all.

Any ideas?



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

Date: Wed, 21 Mar 2001 18:51:45 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: Re: persistent cookie working with Netscape4.7x, not IE5x?
Message-Id: <5L6u6.55143$o7.2391725@news1.rdc1.sdca.home.com>

I had similar problems until I started using the 'simple' cookie.lib that
matt's script archive has:

http://www.worldwidemart.com/scripts/

I 'require' it, then all I have to do is this:

&SetCookies('cookiename','cookieval')

Also, check to make sure the exp date is far off.. [in the cookie.lib
somewhere]

$Cookie_Exp_Date = 'Wed, 08-Jun-2011 00:04:11 GMT';


"Mark Grimshaw" <m.grimshaw@salford.ac.uk> wrote in message
news:3AB8F65C.D8A430C8@salford.ac.uk...
> Using the Set-Cookie header within a perl script, I can set and get
> persistent cookies with Netscape.
>
> With IE5, I can set the cookie (i.e. I can see and read the cookie on my
> client hard drive) but cannot get the cookie back.
>
> Netscape properly sends the HTTP_COOKIE environmental back to the perl
> script from which I can retrieve the state information.
>
> IE5 does not sent HTTP_COOKIE at all.
>
> Any ideas?
>




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

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


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