[15816] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3229 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 1 18:06:48 2000

Date: Thu, 1 Jun 2000 15:05:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <959897119-v9-i3229@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 1 Jun 2000     Volume: 9 Number: 3229

Today's topics:
    Re: [Golf] Re: wc for perl (Neil Kandalgaonkar)
    Re: Activestate down? (Philip 'Yes, that's my address' Newton)
    Re: C to perl? (brian d foy)
    Re: C to perl? (brian d foy)
    Re: C to perl? (Abigail)
    Re: C to perl? (brian d foy)
    Re: C to perl? <juex@deja.com>
    Re: C to perl? (Abigail)
        Can not expire cookies !! jbrzezi@my-deja.com
    Re: Can't seem to find the Form post data <makarand_kulkarni@My-Deja.com>
    Re: file dates being reported incorrectly..... <scumjr@deja.com>
    Re: How can I do that? <makarand_kulkarni@My-Deja.com>
    Re: Inherit data structs from SUPER, How ??? (brian d foy)
    Re: Is Perl for me? <japh@flashmail.com>
        my Foo $self = shift; (Kai Henningsen)
        Networking Perl for NT (TheGregster)
    Re: Newbie <!bull@hotmail.com>
    Re: Newbie (Sam Holden)
    Re: Newbie (Andreas Kahari)
    Re: Newbie: help with linking to another webpage <apage.net[remove]@usa.net>
        Non-reuse of memory for lexically-scoped variables? <dwhaskin@earthlink.net>
        NT GROUP ? <elynt@exchange.ml.com>
        overriding Config.pm? <ksm+usenet@universal.dca.net>
    Re: Parsing Email from Europe <flavell@mail.cern.ch>
        Perl 5.6 Bug: rmdir <laurent.feron@libertysurf.fr>
    Re: Perl 5.6 Bug: rmdir <apage.net[remove]@usa.net>
    Re: Perl 5.6 Bug: rmdir (Abigail)
    Re: Perl 5.6 Bug: rmdir <lauren_smith13@hotmail.com>
        Perl CGI Timing Problem <escondido@bmcwest.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 1 Jun 2000 18:26:18 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: [Golf] Re: wc for perl
Message-Id: <8h69sa$u8t$1@newsflash.concordia.ca>

In article <8h67oi$ntb$1@news.panix.com>, Abigail <abigail@arena-i.com> wrote:

>    perl -pale '$c+=length;$w+=@F}{$_="$. $w $c"'

$ wc testfile
    297     850   13974 testfile
                  ^^^^^
$ perl -pale '$c+=length;$w+=@F}{$_="$. $w $c"' testfile
297 850 13677
        ^^^^^

The culprit appears to be -l, which chomps away newlines. So you can do:

$ perl -pae '$c+=length;$w+=@F}{$_="$. $w $c\n"' testfile
297 850 13974

or, saving a few characters more:

$ perl -pale '$w+=@F}{$_="$. $w ".-s$ARGV' testfile     
297 850 13974


-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: Thu, 01 Jun 2000 18:51:29 GMT
From: nospam.newton@gmx.li (Philip 'Yes, that's my address' Newton)
Subject: Re: Activestate down?
Message-Id: <3936b05c.18616424@news.nikoma.de>

On 31 May 2000 21:30:31 GMT, elaine@chaos.wustl.edu (Elaine -HFB-
Ashton) wrote:

> Also, I might add here that web sites do occasionally go down for a 
> few hours and that it's really damn annoying to watch people post
> 'what happened' notes only a few hours into it.

I would have thought you'd find the "doesn't work for me, either" "nor
for me" type posts (within an hour of each other) even more annoying.

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
If you're not part of the solution, you're part of the precipitate.


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

Date: Thu, 01 Jun 2000 16:05:17 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: C to perl?
Message-Id: <brian-ya02408000R0106001605170001@news.panix.com>

In article <39369087$1@news.microsoft.com>, "Jürgen Exner" <juex@deja.com> posted:

> But: I could write a compiler which accepts C programs as input and
> generates Perl code (instead of assembler) as output.

so, you are saying that Perl is suitable for writing device drivers?
how about an operating system?  

how is Perl going to run before perl can even be loaded?

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Thu, 01 Jun 2000 16:13:20 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: C to perl?
Message-Id: <brian-ya02408000R0106001613200001@news.panix.com>

In article <39369278$1@news.microsoft.com>, "Jürgen Exner" <juex@deja.com> posted:

> That is what you usually use as a metric to compare two programs: The same
> input generates the same output.

what about programs that take no input and give no output?  do you contend
that they are all equivalent?  that seems like a limited view of
computing.

indeed, in that case, every program is a Perl program if
you can use Perl as a wrapper that simply does nothing but
pass on the input and output.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: 1 Jun 2000 20:20:43 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: C to perl?
Message-Id: <8h6gir$qhv$1@news.panix.com>

On Thu, 01 Jun 2000 16:13:20 -0400, brian d foy <brian@smithrenaud.com> wrote:
++ In article <39369278$1@news.microsoft.com>, "Jürgen Exner" <juex@deja.com> posted:
++ 
++ > That is what you usually use as a metric to compare two programs: The same
++ > input generates the same output.
++ 
++ what about programs that take no input and give no output?  do you contend
++ that they are all equivalent?  that seems like a limited view of
++ computing.

Eh, yes, I certainly would say they are equivalent.

If they were different, then how exactly would you notice the difference?


Abigail


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

Date: Thu, 01 Jun 2000 17:19:12 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: C to perl?
Message-Id: <brian-ya02408000R0106001719120001@news.panix.com>

In article <8h6gir$qhv$1@news.panix.com>, abigail@arena-i.com posted:

> On Thu, 01 Jun 2000 16:13:20 -0400, brian d foy <brian@smithrenaud.com> wrote:
> ++ In article <39369278$1@news.microsoft.com>, "Jürgen Exner" <juex@deja.com> posted:
> ++ 
> ++ > That is what you usually use as a metric to compare two programs: The same
> ++ > input generates the same output.
> ++ 
> ++ what about programs that take no input and give no output?  do you contend
> ++ that they are all equivalent?  that seems like a limited view of
> ++ computing.
> 
> Eh, yes, I certainly would say they are equivalent.
> 
> If they were different, then how exactly would you notice the difference?

does that then mean that the only way anything is changed by output?
what then qualifies as output?

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Thu, 1 Jun 2000 14:58:25 -0700
From: "Jürgen Exner" <juex@deja.com>
Subject: Re: C to perl?
Message-Id: <3936dc81$1@news.microsoft.com>

"brian d foy" <brian@smithrenaud.com> wrote in message
news:brian-ya02408000R0106001605170001@news.panix.com...
> In article <39369087$1@news.microsoft.com>, "Jürgen Exner" <juex@deja.com>
posted:
>
> > But: I could write a compiler which accepts C programs as input and
> > generates Perl code (instead of assembler) as output.
>
> so, you are saying that Perl is suitable for writing device drivers?

Not at all.
All I said was that it is possible to write a device driver in Perl.
But I very much doubt that using Perl for this purpose would be a smart
idea.

> how about an operating system?
Again:
Possible? Yes, without any doubt.
Smart? I don't think so.

> how is Perl going to run before perl can even be loaded?
Are you pounding on the difference between a compiled versus an interpreted
language? Very minor technicality. Even for an OS written in C you cannot
simply take the a.out and tell the boot loader to run this a.out. There is
more to booting an OS.
As for Perl: In the worst case I could simply prepend the code for the Perl
interpreter to the Perl OS itself. As I said, a minor technicality.

jue




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

Date: 1 Jun 2000 22:03:35 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: C to perl?
Message-Id: <8h6mjn$shv$1@news.panix.com>

On Thu, 01 Jun 2000 17:19:12 -0400, brian d foy <brian@smithrenaud.com> wrote:
++ In article <8h6gir$qhv$1@news.panix.com>, abigail@arena-i.com posted:
++ 
++ > On Thu, 01 Jun 2000 16:13:20 -0400, brian d foy <brian@smithrenaud.com> wrote:
++ > ++ In article <39369278$1@news.microsoft.com>, "Jürgen Exner" <juex@deja.com> posted:
++ > ++ 
++ > ++ > That is what you usually use as a metric to compare two programs: The same
++ > ++ > input generates the same output.
++ > ++ 
++ > ++ what about programs that take no input and give no output?  do you contend
++ > ++ that they are all equivalent?  that seems like a limited view of
++ > ++ computing.
++ > 
++ > Eh, yes, I certainly would say they are equivalent.
++ > 
++ > If they were different, then how exactly would you notice the difference?
++ 
++ does that then mean that the only way anything is changed by output?

How would you know something is changed if there's no output?

++ what then qualifies as output?

What qualifies as "changed"?


Abigail


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

Date: Thu, 01 Jun 2000 20:04:51 GMT
From: jbrzezi@my-deja.com
Subject: Can not expire cookies !!
Message-Id: <8h6fkr$da6$1@nnrp1.deja.com>

I am using CGI::Cookie module.
I can read cookies but I have problem with expiring them:

I tried:

@content_cookie=();
%cookies = fetch CGI::Cookie;
foreach(keys %cookies)  #get existing cookies
  {
    $current_cookie    = $cookies{$_};
    $current_cookie->expires('-1d');
    push(@content_cookie, $current_cookie);
  }
print header(-cookie=>\@content_cookie);

according to documentation all the cookies with passed expiration date
should not exist anymore.
However when I read cookies again they are there !
Any suggestions ?

Thanks,
Jerzy (jerzy@nandoDOTcom)


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 01 Jun 2000 13:44:05 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Can't seem to find the Form post data
Message-Id: <3936CB15.F9C398F0@My-Deja.com>

> mostly, my trouble stems from not being able to use CGI->param(), I get an
> 'unknown function' error.

post the code.
-



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

Date: Thu, 01 Jun 2000 21:04:42 GMT
From: "scumjr" <scumjr@deja.com>
Subject: Re: file dates being reported incorrectly.....
Message-Id: <KdAZ4.7308$dK2.207827@news20.bellglobal.com>


> NT seems to report the file date in the 11-th field returned by stat().
>
> my $f_time = scalar localtime( (stat 'filename')[10] );

Thanks for the tip, but I've been using indices 8 and 9 (last access/modify
time) and it's been reporting the date as 11/31/69 (dates are offset by one
so it is in fact reporting December (not Nov.)) for any files that have a
"special" character in the name (ie the 1/2 character).   For example the
actual last modified time stamp would be 3/12/99......it would report
11/31/69.   Actual last access time 8/27/00.....it would report 11/31/69.
For ALL other files the time stamps are correct.





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

Date: Thu, 01 Jun 2000 13:37:27 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: How can I do that?
Message-Id: <3936C987.CB70ACC3@My-Deja.com>

>     I have a Perl program that do some query on a Oracle database. I
> need to pass the result fecth from my perl program to another program
> that is made in C.
>
>     It's because I have some to do some treatment with the API of a
> program that we use here that are coded in C
>
>      Suppose I have fetch FirstName, LastName, Date and I want to pass
> those 3 value to my C program so he can use an API function that need
> these 3 values.How can I do that ?

perldoc  perlxs

--




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

Date: Thu, 01 Jun 2000 16:09:03 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Inherit data structs from SUPER, How ???
Message-Id: <brian-ya02408000R0106001609030001@news.panix.com>

In article <8h60c3$2u3$1@nnrp1.deja.com>, John from PUNY <john@thinman.com> posted:

> package Super ;
> 
> use Sub   ;
> 
> my $test_var = "test!!" ;


are you sure you wanted a lexical variable there?  remember that
lexical variables are not visible outside of their scope.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>


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

Date: Thu, 01 Jun 2000 13:39:04 -0500
From: Flounder <japh@flashmail.com>
Subject: Re: Is Perl for me?
Message-Id: <3936ADC8.48AED2F2@flashmail.com>

neil@pacifier.com wrote:

> Charles W. Strickland <cstrickland@surry.net> wrote:
> > Okay, I've done quite a bit of reading (even have Wall's book) about
> > Perl.  I am primarily a Solaris/Linux SA, but have not really found a
> > source of unix Perl programs.  I keep hearing about the benefits of
> > Perl and unix, but, as I say, have not found many examples of
> > applications.  I am not slamming Perl.  I can really see it's power.
> > I just want to see some useful examples.

I ran grep on the files just in my /usr/bin direcotory on my home Linux
box and found ~60 programs that contained the line #!/usr/bin/perl so
there is ~60 programs in one directory that is alot of examples. Here is
the output from grep:

/usr/bin/GET:#!/usr/bin/perl -w
/usr/bin/HEAD:#!/usr/bin/perl -w
/usr/bin/POST:#!/usr/bin/perl -w
Binary file /usr/bin/a2p matches
/usr/bin/addxface:#!/usr/bin/perl
/usr/bin/c2ph:#!/usr/bin/perl
/usr/bin/cutbl:#!/usr/bin/perl -w
/usr/bin/dbmmanage:#!/usr/bin/perl
/usr/bin/facesaddr:#!/usr/bin/perl -s
/usr/bin/facesall:#!/usr/bin/perl -s
/usr/bin/find2perl:#!/usr/bin/perl
/usr/bin/find2perl:$startperl = "#!/usr/bin/perl";
/usr/bin/findtr:#!/usr/bin/perl -w
/usr/bin/from.faces:#!/usr/bin/perl -P
/usr/bin/gifburst:#!/usr/bin/perl
/usr/bin/gnome2kde.pl:#!/usr/bin/perl
/usr/bin/grog:#!/usr/bin/perl
/usr/bin/h2ph:#!/usr/bin/perl
/usr/bin/h2xs:#!/usr/bin/perl
/usr/bin/helpme:#!/usr/bin/perl
/usr/bin/ietf2datebook:#!/usr/bin/perl -w
/usr/bin/kdoc:#!/usr/bin/perl -I/var/tmp/kdelibs-build-root/usr/share/kdoc

/usr/bin/keytab-lilo.pl:#!/usr/bin/perl
/usr/bin/lpqall.faces:#!/usr/bin/perl
/usr/bin/lspcidrake:#!/usr/bin/perl
/usr/bin/lwp-download:#!/usr/bin/perl -w
/usr/bin/lwp-mirror:#!/usr/bin/perl -w
/usr/bin/lwp-request:#!/usr/bin/perl -w
/usr/bin/lwp-rget:#!/usr/bin/perl -w
/usr/bin/mailq.faces:#!/usr/bin/perl
/usr/bin/makekdedoc:#!/usr/bin/perl -I/usr/share/kdoc
/usr/bin/mkfacesindex:#!/usr/bin/perl
/usr/bin/mysqlaccess:#!/usr/bin/perl5
/usr/bin/newscheck.faces:#!/usr/bin/perl
/usr/bin/newsfrom.faces:#!/usr/bin/perl
/usr/bin/perlbug:#!/usr/bin/perl
/usr/bin/perlcc:#!/usr/bin/perl
/usr/bin/perldl:#!/usr/bin/perl
/usr/bin/perldoc:#!/usr/bin/perl
/usr/bin/pilot-undelete:#!/usr/bin/perl
/usr/bin/pl2pm:#!/usr/bin/perl
/usr/bin/pod2html:#!/usr/bin/perl
/usr/bin/pod2latex:#!/usr/bin/perl
/usr/bin/pod2man:#!/usr/bin/perl
/usr/bin/pod2text:#!/usr/bin/perl
/usr/bin/pstruct:#!/usr/bin/perl
/usr/bin/qt20fix:#!/usr/bin/perl -w
/usr/bin/qt2kdoc:#!/usr/bin/perl -I/usr/share/kdoc
/usr/bin/qtrename140:#!/usr/bin/perl -pi.oldnames
/usr/bin/rotary.faces:#!/usr/bin/perl
/usr/bin/s2p:#!/usr/bin/perl
/usr/bin/s2p:$startperl = "#!/usr/bin/perl";
/usr/bin/splain:#!/usr/bin/perl
/usr/bin/svgakeymap:#!/usr/bin/perl
/usr/bin/sync-plan:#!/usr/bin/perl
/usr/bin/texexec:#D {#!/usr/bin/perl}.
/usr/bin/texutil:#D {#!/usr/bin/perl}.
/usr/bin/tkmib:#!/usr/bin/perl -w
/usr/bin/unpack:#!/usr/bin/perl
/usr/bin/urpmi:#!/usr/bin/perl -U
/usr/bin/urpmi_rpm-find-leaves:#!/usr/bin/perl
/usr/bin/workman2cddb.pl:#!/usr/bin/perl


>
>
> > I have written several cgi Perl programs for my web server.  I am
> > still looking for unix applications.

Look on your own system. You probably use perl programs and don't even
know it. Not all perl programs end in .pl

>
>
> http://www.perl.com is a good resource page where you might find what
> you seek.
>
> --
>
> Neil

--
>+++++++[<++++++++++>-]<++++.---------.+.++++.++.





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

Date: 01 Jun 2000 23:16:00 +0200
From: kaih=7f04f891w-B@khms.westfalen.de (Kai Henningsen)
Subject: my Foo $self = shift;
Message-Id: <7f04f891w-B@khms.westfalen.de>

The above is from the perl 5.6 fields.pm documentation.

I haven't been able to find any documentation at all on what this syntax  
*means* (though I've found it *mentioned* in two or three other places,  
enough to believe it's not a typo). Where is it hidden?

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Thu, 01 Jun 2000 21:34:50 GMT
From: greg.niemiec@per-se.com (TheGregster)
Subject: Networking Perl for NT
Message-Id: <_FAZ4.4025$pk3.216293@bgtnsc04-news.ops.worldnet.att.net>

Hello Everyone,

I am having difficulty networking perl in an Windows environment.  I want perl
to reside on the server and I want everyone to access it including any
packages that I install. Its a centralization issue and I can't seem to get
the clients to work properly. Once I map the drive to the server I do a simple
"Perl -V" and it can't see the libaries. I don't want to have perl reside
locally if I can help it.. 

Ant Help would be greatly appreciated.

Greg 



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

Date: Thu, 01 Jun 2000 16:54:18 -0400
From: "!bull" <!bull@hotmail.com>
Subject: Re: Newbie
Message-Id: <3936CD7A.B1F71CF5@hotmail.com>



nobull@mail.com in a moment of utter stupidity wrote:

> Please consult the FAQ before posting _especially_ in a field/NG where
> you are new.
>
> You should also find the person responsible for giving you access to
> Usenet shake them warmly by the throat and explain to them that they
> should not be letting people loose on Usenet without this advice.
>
> --
>      \\   ( )
>   .  _\\__[oo
>  .__/  \\ /\@
>  .  l___\\
>   # ll  l\\
>  ###LL  LL\\

You ever hear the saying "If you don't have anything nice (in this case
helpfull) to say ....."  You know the rest I know you do !  Give us a break and
just try to be helpfull and not insulting.



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

Date: 1 Jun 2000 20:55:34 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Newbie
Message-Id: <slrn8jdje6.h0f.sholden@pgrad.cs.usyd.edu.au>

On Thu, 01 Jun 2000 16:54:18 -0400, !bull <!bull@hotmail.com> wrote:
>
>
>nobull@mail.com in a moment of utter stupidity wrote:
>
>> Please consult the FAQ before posting _especially_ in a field/NG where
>> you are new.
>>
>> You should also find the person responsible for giving you access to
>> Usenet shake them warmly by the throat and explain to them that they
>> should not be letting people loose on Usenet without this advice.

<snip a quoted sig>
>
>You ever hear the saying "If you don't have anything nice (in this case
>helpfull) to say ....."  You know the rest I know you do !  Give us a break and
>just try to be helpfull and not insulting.

You were just given extremely helpful advice. 

Have fun posting to the empty void...



-- 
Sam

Any computer scientist who praises orthogonality should be sentenced to
use an Etch-a-Sketch.
	-- Larry Wall


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

Date: 1 Jun 2000 23:00:36 +0100
From: andkaha@hello.to.REMOVE (Andreas Kahari)
Subject: Re: Newbie
Message-Id: <3936cef4@merganser.its.uu.se>

In article <3936CD7A.B1F71CF5@hotmail.com>, !bull <!bull@hotmail.com> wrote:
>
>
>nobull@mail.com in a moment of utter stupidity wrote:
>
>> Please consult the FAQ before posting _especially_ in a field/NG where
>> you are new.
>>
>> You should also find the person responsible for giving you access to
>> Usenet shake them warmly by the throat and explain to them that they
>> should not be letting people loose on Usenet without this advice.
[cut]
>You ever hear the saying "If you don't have anything nice (in this case
>helpfull) to say ....."  You know the rest I know you do !  Give us a break and
>just try to be helpfull and not insulting.
>

Sorry, but that advice is one of the best I've ever seen in a NG! I
don't know how they do things in Toronto, but on the net it's good to
know about a tiny bit about netiquette.

/A

-- 
# Andreas Kähäri, <URL:http://hello.to/andkaha/>.
# All junk e-mail is reported to the
# appropriate authorities, no exceptions.


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

Date: Thu, 1 Jun 2000 15:57:10 -0400
From: "Zowwie" <apage.net[remove]@usa.net>
Subject: Re: Newbie: help with linking to another webpage
Message-Id: <sjdg0qob5ri166@corp.supernews.com>

It appears as though your Location field is attempting to redirect the user
to a URL that resides off of the directory that you run the script from.

Try this instead....
print "Location: http://www.mydomain.com/search-main.html\n\n"; #load new
page

If you REALLY don't want to put the ENTIRE domain name all over again... You
can use a 'backup' syntax.
For each ../ the users browser will refer to one directory previous to its
current... So for good measure you could try....

print "Location: ../../../../search-main.html\n\n"; #load new

*I am note sure if the second will function with all browsers. ;(


Good luck.




"MJS" <shartlly@home.com> wrote in message news:39368736.117175826@news...
> I'm very new at this and am learning via looking at some existing
> code.  I want to call a HTML page if something is true.  The following
> line of code is supposed to do it, but it doesn't work.  It always
> brings up the download file window of the web browser.
>
> I've tried variations suich as http://www....
> as the Location: and it did no better.
>
> Enough ranting:  here is the line:
>
> if ($FORM{'add_continue.x'}) {
> print "Location: search-main.html \n\n"; #load new page
> continue shopping
> exit;
> } else {
> &display; #give chance to edit and finalize
> }
>
>
> Thanks in advance for your help.
>
> Mike




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

Date: Thu, 01 Jun 2000 21:08:23 GMT
From: Denis Haskin <dwhaskin@earthlink.net>
Subject: Non-reuse of memory for lexically-scoped variables?
Message-Id: <3936D032.51FA5C51@earthlink.net>

Ilya Zakharevich wrote:

> No it is not.  Lexicals, compile-time and scratch variables are
> sticky: whatever goes there, remains there.
>
>   my $a = 'a';
>   my $b = 'b' x 1e6 . $a . $a;
>
> would take 3M (in recent Perls): one for 'b' x 1e6 (done at compile
> time), one for a scratch variable which contained b...ba, and one
> which sits in $b.  [Older Perls would take an extra 1M for b...baa in
> a scratch variable.]
>
> Only one of these Ms is recoverable, one in $b, and only by explicit
>
>   undef $b;
>
> Ilya

Arrrrrgh!  Is this really true?  This is nuts (but it may explain why I
think I have a memory leak)!

Shouldn't this be considered a bug?  So if I say:
    {
        my $b; # yes I know I can my and init at same time.
        $b = 'x' x 1e6;
    }
even though $b is out of scope once I'm out of the block, that memory has
been allocated and is not reused?  How can anyone write anything of
reasonable size & complexity in Perl if that's the case?

Is there a (good) reason that things work this way?

What's a recommended workaround?  If I'm writing classes (oops: 'packages'),
this means all the memory allocated by my lexical variables (and I use a lot
of them) never gets reused... I guess I could make them all member variables
(e.g. $self->{myVariable}) but that seems like tremendous overkill.

Geez...

dwh


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

Date: Thu, 01 Jun 2000 17:19:45 -0400
From: Eli Mansour <elynt@exchange.ml.com>
Subject: NT GROUP ?
Message-Id: <3936D371.3BCAF810@exchange.ml.com>

Is there any newsgroup that I can post Win32 API calls ?

Eli



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

Date: Thu, 1 Jun 2000 16:55:17 -0400
From: Ken MacFarlane <ksm+usenet@universal.dca.net>
Subject: overriding Config.pm?
Message-Id: <Pine.BSI.4.21.0006011627001.21667-100000@universal.dca.net>

Coming to terms with lack of admin privileges and idiotic "guidelined
packages" on a client system leaves me in the following dilema:

I'm trying to make an XS-supported module using my own installation of
gcc.  When attempting the "perl Makefile.PL" step, the system Perl
installation uses its Config.pm, which was created based on the brain-dead
non-ANSI system compiler; as a result, the make fails.

What I'd like is to generate my own Config.pm (or other workaround) using
my working version of gcc, and then in turn use that in the "perl
Makefile.PL" step.  I looked at the docs for Config.pm and perlembed, but
nothing struck me as relevant to this problem.  Short of compiling my own
version of Perl as well, does anyone have any thoughts?

Thanks in advance...

-- 
                                                     Ken MacFarlane
                                                       <ksm@dca.net>
                                         http://members.dca.net/ksm/ 



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

Date: Thu, 1 Jun 2000 21:35:52 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Parsing Email from Europe
Message-Id: <Pine.GHP.4.21.0006012127210.2469-100000@hpplus03.cern.ch>

On 1 Jun 2000, Abigail wrote:

> Note that Å and such are perfectly valid in HTML, 

They are, if they're in the repertoire of the current character
coding ("charset"), yes.  Quick check of Abigail's posting headers:

  Content-Type: text/plain; charset=iso-8859-1

Yup, you're OK there.

> so there isn't much need to encode them.

If you were using (say) iso-8859-7, or koi8-r, as your charset, there
sure would be a need     ;-)

Both of these character codings are used "in Europe", after all.

(Do I need to cite RFC2070 at this point?  Surely not...)

all the best



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

Date: Thu, 01 Jun 2000 21:32:50 +0200
From: liberty <laurent.feron@libertysurf.fr>
Subject: Perl 5.6 Bug: rmdir
Message-Id: <3936BA62.DDB2AC59@libertysurf.fr>

Hi, this script does'nt work on a Windows NT 4 ( but works on W98 with
activeperl 5.005_03)

test.pl:
--------
open(DIR,"test") || die "Open Error\n";
close(DIR);
rmdir("test") || die "Rmdir Error\n";

>perl test.pl
Rmdir Error





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

Date: Thu, 1 Jun 2000 16:07:41 -0400
From: "Zowwie" <apage.net[remove]@usa.net>
Subject: Re: Perl 5.6 Bug: rmdir
Message-Id: <sjdgkikt5ri146@corp.supernews.com>

Might be a security issue....

I had a similar problem with a script on NT.

I am sure there are other work arounds... But here are two that may work.


Replace:
open(DIR,"test") || die "Open Error\n";
close(DIR);
rmdir("test") || die "Rmdir Error\n";

With:
qx~doit.bat test~;

Make batch file called 'doit.bat' and place it in the directory where this
perl program is ran from.

doit.bat
del c:/web/htdocs/%1

%1 will be what ever you passed to the batch file.


You may also try this....   Since NT will usually run from what ever
directory the perl program is executed from... Try to specify the entire
path to test.

Replace:
open(DIR,"test") || die "Open Error\n";
close(DIR);
rmdir("test") || die "Rmdir Error\n";

With:
open(DIR,"test") || die "Open Error\n";
close(DIR);
rmdir("c:/web/htdocs/test") || die "Rmdir Error\n";



Good luck! :)


"liberty" <laurent.feron@libertysurf.fr> wrote in message
news:3936BA62.DDB2AC59@libertysurf.fr...
> Hi, this script does'nt work on a Windows NT 4 ( but works on W98 with
> activeperl 5.005_03)
>
> test.pl:
> --------
> open(DIR,"test") || die "Open Error\n";
> close(DIR);
> rmdir("test") || die "Rmdir Error\n";
>
> >perl test.pl
> Rmdir Error
>
>
>




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

Date: 1 Jun 2000 20:23:19 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: Perl 5.6 Bug: rmdir
Message-Id: <8h6gnn$qhv$2@news.panix.com>

On Thu, 01 Jun 2000 21:32:50 +0200, liberty <laurent.feron@libertysurf.fr> wrote
++ Hi, this script does'nt work on a Windows NT 4 ( but works on W98 with
++ activeperl 5.005_03)
++ 
++ test.pl:
++ --------
++ open(DIR,"test") || die "Open Error\n";
++ close(DIR);
++ rmdir("test") || die "Rmdir Error\n";
++ 
++ >perl test.pl
++ Rmdir Error


What do you mean, it doesn't work? It looks like it works fine to me.
The program can't remove the directory, and it tells you so. It isn't
instructed to tell you why it can't remove the directory, and hence
it doesn't tell you.

Why do you think the program doesn't work?


Abigail


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

Date: Thu, 1 Jun 2000 13:17:18 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Perl 5.6 Bug: rmdir
Message-Id: <8h6h0a$4nh$1@brokaw.wa.com>


liberty <laurent.feron@libertysurf.fr> wrote in message
news:3936BA62.DDB2AC59@libertysurf.fr...
> Hi, this script does'nt work on a Windows NT 4
>
> test.pl:
> --------
> open(DIR,"test") || die "Open Error\n";
> close(DIR);
> rmdir("test") || die "Rmdir Error\n";
>
> >perl test.pl
> Rmdir Error

I don't see anywhere in the documentation for rmdir() that it is designed to
delete files.

perldoc -f rmdir

Lauren





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

Date: Thu, 1 Jun 2000 12:20:43 -0600
From: "bc" <escondido@bmcwest.com>
Subject: Perl CGI Timing Problem
Message-Id: <9MxZ4.255$QC6.59752@news.gstis.net>

Should I use wait? Should I worry about unflushed buffers? I have resorted
to sleep n, which works for large enough n.  Code examples appreciated.

bc

open(FOUND_RPTS, "/usr/bin/find /dir -name whatever -print \|") || die
"ERROR: find: $!\n";
sleep 5;
chop(@found = <FOUND_RPTS>);
close(FOUND_RPTS);

and...

 open(RPT_PATH, "/dir/cmd1 $_ | cmd2 |") || die "ERROR: $!\n";
      wait; # or sleep n
      $rpt_path = <RPT_PATH>;
      close(RPT_PATH);





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

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 V9 Issue 3229
**************************************


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