[13971] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1381 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 15 12:18:22 1999

Date: Mon, 15 Nov 1999 09:05:17 -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: <942685516-v9-i1381@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 15 Nov 1999     Volume: 9 Number: 1381

Today's topics:
    Re: $variable == null?? <ewinter@pop3.stx.com>
    Re: /o in regexp <moseley@best.com>
        another Reg. Exp. problem <reembar@netvision.net.il>
    Re: another Reg. Exp. problem <sariq@texas.net>
    Re: another Reg. Exp. problem (Abigail)
        Can open file with Telnet but not browser <amoore@thebigstuff.com>
    Re: Can open file with Telnet but not browser <mark.bluemelNOmaSPAM@siemens.co.uk.invalid>
    Re: Can open file with Telnet but not browser <amonotod@netscape.net>
    Re: CHMOD for Net::FTP. Help, cool hackers ! <bruce.blackshaw@saudibank.REMOVE.com.THIS>
        Connecting a 4D Database with Perl <ah@datapharm.de>
        CPAN on CD-ROM? <garcia868@yahoo.com>
        cron filehandle palenaka@my-deja.com
    Re: date_to_ticks <Mike.Wescott@ColumbiaSC.NCR.COM>
    Re: Generating pi (Ilya Zakharevich)
    Re: Help (back for guru): using setsid() to invoke diss (Anno Siegel)
    Re: Help With CyberCash.... (Mr. X)
    Re: Help with Stoopid Nutscrape (Netscape) (Bart Lateur)
    Re: Help: Struggling with fork (Randal L. Schwartz)
    Re: How can I test CGI-Perl locally on PC ?? <moseley@best.com>
    Re: HTML Perl Convert Command, <moseley@best.com>
    Re: Is $$variable allowed like in PHP ? <bene@chiark.greenend.org.uk>
    Re: Is $$variable allowed like in PHP ? (Simon Cozens)
        Making a Perl/Tk standalone executable <nigel_williams@my-deja.com>
    Re: Making http requests with extra headers <moseley@best.com>
        mSQL/Perl <erick.jensen@unisys.com>
        New Perl and CGI Resource site info@perlscan.com
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 15 Nov 1999 09:30:50 -0500
From: "Eric Winter" <ewinter@pop3.stx.com>
Subject: Re: $variable == null??
Message-Id: <80p5df$bhc@post.gsfc.nasa.gov>

Probably in the FAQ, but here goes.

By "null" I assume you mean the Perl equivalent of undefined. Checking for
that is easy:

 ...
if (not defined($myvar)) {
    # Do something for the undefined variable.
}
 ...

HTH
Eric Winter
Abel Almazán <abel.almazan@ogilvyinteractive.es> wrote in message
news:382FFB3F.66E9987B@ogilvyinteractive.es...
> How can i know if a var is null??
>
> syntax to do that
>
> thanx
>




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

Date: Mon, 15 Nov 1999 07:09:28 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: /o in regexp
Message-Id: <MPG.1299c208eda55109989879@nntp1.ba.best.com>

> Bill Moseley <moseley@best.com> wrote:
> :>I converted a CGI script to a mod_perl script and had to remove some /o 
> :>from regexps.
> 
> :>The regexps only need to get built once per execution, so it was good to 
> :>use them in CGI where the script runs and exits.  The expressions are 
> :>based on data from that request and changes with each request to the CGI 
> :>script.  Thus, in mod_perl the script doesn't exit, so I can't use /o.
> 
> :>Short of eval'ing the entire script, is there a way I could tell perl to 
> :>recompile all the /o expressions?
> 

lee.lindley@bigfoot.com (lee.lindley@bigfoot.com) suggests...
> Use qr{} to build the regexp outside the loop.

Well, that's what I'm doing.  But of course, there's no 'outside the 
loop' in mod_perl.

> Is there ever a time when /o would have a meaning for a regexp
> built with the qr operator?  I can't see one.

Maybe if I explain:

Each 'request' to my CGI script I build one or more regular expressions 
using qr{} that are used over and over during that request in m// and 
s///.

   $match{ $field } = qr/^($terms)/;

This is used to hightlight words returned in a search engine search. 
$field describes where the expression applies (e.g. title, body, 
subject, urls), and $terms is a | joined list of search terms.

Then $match{ $field } is later used while parsing and printing results 
to search the search results for words that match and thus need to be 
highlighted.  m/$match{ $field }/ is used many, many times so it would 
be nice to have that precompiled by saying instead:

   $match{ $field } = qr/^($terms)/o;

This works great under CGI where the program is called once per search 
request, but in mod_perl, the program doesn't exit after a request.  So 
if I use /o the highlighting works for the first search, but subsequent 
searches for different terms still highlight the the words from the 
first search.


-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Mon, 15 Nov 1999 16:46:49 +0200
From: Re'em Bar <reembar@netvision.net.il>
Subject: another Reg. Exp. problem
Message-Id: <38301CD9.6C21AD0A@netvision.net.il>

here it is:
I joined an arrey of HTML file without removing the 'new line' tags
first, because I'll use them to split it later back again:
$text=join("",@htmlFile);
now, I remove all the remarks from this joined HTML file :
$text=~s/<--[^-->]*-->/\n/g;
but devil and hell! the [^-->]* won't match the \n tags! so it won't
remove a remark which spread over several lines.
what should I do?
-- 
Re'em
http://snark.co.il


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

Date: Mon, 15 Nov 1999 09:38:32 -0600
From: Tom Briles <sariq@texas.net>
Subject: Re: another Reg. Exp. problem
Message-Id: <383028F8.A19B6AD3@texas.net>

Re'em Bar wrote:
> 
> here it is:
> I joined an arrey of HTML file without removing the 'new line' tags
> first, because I'll use them to split it later back again:
> $text=join("",@htmlFile);
> now, I remove all the remarks from this joined HTML file :
> $text=~s/<--[^-->]*-->/\n/g;
> but devil and hell! the [^-->]* won't match the \n tags! so it won't
> remove a remark which spread over several lines.
> what should I do?

You have been told several times to *read the documentation before
posting*.  Kindly stop using comp.lang.perl.misc as your personal
helpdesk.

Now, what portion of the perlop documentation is confusing you?

- Tom


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

Date: 15 Nov 1999 10:46:47 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: another Reg. Exp. problem
Message-Id: <slrn830ee8.cvu.abigail@alexandra.delanet.com>

Re'em Bar (reembar@netvision.net.il) wrote on MMCCLXVII September
MCMXCIII in <URL:news:38301CD9.6C21AD0A@netvision.net.il>:
-- here it is:
-- I joined an arrey of HTML file without removing the 'new line' tags
-- first, because I'll use them to split it later back again:
-- $text=join("",@htmlFile);
-- now, I remove all the remarks from this joined HTML file :
-- $text=~s/<--[^-->]*-->/\n/g;
-- but devil and hell! the [^-->]* won't match the \n tags! so it won't
-- remove a remark which spread over several lines.
-- what should I do?


"\n tag"s? What are that? \n are characters. They are easily removed
with y/\n//d;

As for removing "remarks" (comments is a better name), not only is
your regex wrong on multiple accounts, it's also wrong to try to
parse HTML documents using regexes.

    s/<--[^-->]*-->/\n/g

would mean to replace all text starting with '<--' followed by text
not containining anything between '-' and '>', and ending with '-->'
with a newline.

[^-->] doesn't do what you think it does. The use of '-' inside a class
([]), is special, except when used as the first char, or the second
char if the first char is a ^.

HTML comments however start with '<!', then have zero or more times
    '--' text not containing '--' followed by '--'
separated by optional whitespace, then optional whitespace, then '>'.

    <!>
    <!-- -- -->Still a comment<!-- -- -->
    <!-- -- >

But, in certain places, these things aren't comments:

    <img src = "foo.gif" alt = "<!-- -->">
    <script>
    <!--  
       This is CDATA, not a comment.
      -->
    </script>


If you need to parse HTML, use a parser. And no, HTML::Parser isn't
an HTML parser. But the CPAN namespace is as bad as DNS registration:
first come, first serve, whether the name makes sense or not.


Abigail
-- 
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 15 Nov 1999 09:27:57 -0800
From: "Amy D. Moore" <amoore@thebigstuff.com>
Subject: Can open file with Telnet but not browser
Message-Id: <383037b2@news.together.net>

I am sorry if this post shows up twice - I originally posted from DeJa
News - because I was searching for an answer there. But I don't trust my
post to show up, and my e-mail doesn't get linked to the message.

I have this subroutine in a script:

sub get_data {
open(GUIDE, '< storeloc.txt') or die "Can't open store.txt.\n";
## End get_data
}

When I run the script in Telnet, it prints out all the HTML just fine.
When I run it in a browser, "Can't open store.txt" shows up in the error
message. This has me completely befuddled.

Location of script: http://www.triumphglass.com/locations/default.cgi
The storeloc.txt file is in the same directory.

Thank you.

Amy D. Moore
webmaster@diamondtriumph.com




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

Date: Mon, 15 Nov 1999 06:53:37 -0800
From: Mark Bluemel <mark.bluemelNOmaSPAM@siemens.co.uk.invalid>
Subject: Re: Can open file with Telnet but not browser
Message-Id: <0a0133f8.375f0db9@usw-ex0101-006.remarq.com>

In article <383037b2@news.together.net>, "Amy D. Moore"
<amoore@thebigstuff.com> wrote:
> I have this subroutine in a script:
> sub get_data {
> open(GUIDE, '< storeloc.txt') or die "Can't open store.txt.\n";
> ## End get_data
> }

Why not include $! in the error message? Then you'd get a more useful
diagnostic...

> When I run the script in Telnet, it prints out all the HTML just
> fine.
> When I run it in a browser, "Can't open store.txt" shows up in the
> error
> message. This has me completely befuddled.
> Location of script:
> http://www.triumphglass.com/locations/default.cgi

but that doesn't mean that that will be the current directory when the
script is executed, does it?

> The storeloc.txt file is in the same directory.

You'd probably be safer giving a full pathname in the script, don't you
think?

Have you read the Perl and CGI FAQ -
http://www.perl.com/pub/doc/FAQs/cgi/perl-cgi-faq.html ?

and the idiots (no offence intended - if publisher's can make money
encouraging people to think they're dummies ... :-) guide to solving
Perl CGI problems -
http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html?

HTH

--

Mark Bluemel


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Mon, 15 Nov 1999 16:00:03 GMT
From: amonotod <amonotod@netscape.net>
Subject: Re: Can open file with Telnet but not browser
Message-Id: <80pam0$6ev$1@nnrp1.deja.com>

In article <383037b2@news.together.net>,
  "Amy D. Moore" <amoore@thebigstuff.com> wrote:

> sub get_data {
> open(GUIDE, '< storeloc.txt') or die "Can't open store.txt.\n";
> ## End get_data
> }
>
> Location of script: http://www.triumphglass.com/locations/default.cgi

Yeah, that is a pretty wacked out error...  I'd say that you may want to
use a complete path to the file, or maybe set your working directory to
the complete path...

do a quick test, some MS machines use c:\perl\bin\ as the working
directory, so you may need to set your directory...  This doesn't
usually affect Unix machines, but you never know...


#!perl
use Cwd;

my $dir=Cwd::cwd;
print "Content-type: text/html\n\n";
print "The current dir is $dir\n";
exit;


Good Luck...
amonotod

--
    `\|||/                     amonotod@
      (@@)                     netscape.net
  ooO_(_)_Ooo________________________________
  _____|_____|_____|_____|_____|_____|_____|_____|


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


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

Date: Mon, 15 Nov 1999 16:48:09 +0000
From: Bruce Blackshaw <bruce.blackshaw@saudibank.REMOVE.com.THIS>
Subject: Re: CHMOD for Net::FTP. Help, cool hackers !
Message-Id: <38303949.44383E72@saudibank.REMOVE.com.THIS>



MetaWizard wrote:

> The VirtualAvenue(www.virtualave.net) freehosting server enable
> entrance to your account only via FTP. To change mode of files in my
> directories I am writing "chmod 0666 test.txt"(for examle).
> So I need realization of this method to make this procedure from Perl-
> script. But Net::FTP doesn't enable it. I ask everybody who may help me!

AFAIK standard FTP does not permit chmod operations.

bruce




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

Date: Mon, 15 Nov 1999 16:52:05 -0800
From: Andreas Huber <ah@datapharm.de>
Subject: Connecting a 4D Database with Perl
Message-Id: <3830AAA0.334A03FB@datapharm.de>

Hi,

can I connect a 4D(Mac) Database with Perl 5???

Thx

 
Andy


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

Date: Mon, 15 Nov 1999 08:05:13 -0800 (PST)
From: J Garcia <garcia868@yahoo.com>
Subject: CPAN on CD-ROM?
Message-Id: <19991115160513.16988.rocketmail@web1606.mail.yahoo.com>

I was wondering if there are any companies out there
that sell all the scripts, docs, etc. available at
CPAN on CD-ROM (perhaps something like a quarterly
subscription)? Any ideas?

=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com


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

Date: Mon, 15 Nov 1999 16:05:26 GMT
From: palenaka@my-deja.com
Subject: cron filehandle
Message-Id: <80pb03$6r9$1@nnrp1.deja.com>

	I have two cron jobs that aren't functioning correctly on
a Solaris Box.  "generateHostsFile" is supposed to update a file
('ascendHostsFile'), and "scanascend" gunzip's the current trapd.log
archive to <STDOUT> and greps for certain events I'm interested
in for a email report. Both jobs run once a day around midnight.

	There are two problems with the cron jobs. Both scripts function
correctly when run manually. However when the cron daemon runs the
scripts, a file is created but nothing is ever written to it. I end up
with a zero byte file in both cases.

	The other problem I notice has to do with the cron reporting.
Normally when I run a unix cron job, unix will send me an email with the
results of the cron job, if anything was printed to <STDOUT>. I don't
get these mailing from the server.

	Please let me know what you find out, these are two situations I
have never encountered and I am interested in the fix.

--
Here are two suggestions by one of my coworkers:

Problem 1, I suggest checking that all paths are specified in all the
scripts. That's usually what catches me when it works for me manually
and not in a cron.

Problem 2, see if the email works by loggin in and
sending a message manually.

--


        I have a .forward file in my home dir and any email I send to my
account is redirected to my pop3 account. I have successfully tested
this out with the UNIX mail command.

	I have also indicated the full path
to each file I want to access in the scripts, so I know it's finding the
files.

	The wierd coincidence is that the scripts are creating the files
they are supposed to, they just aren't writing to them. And also the
fact that no mailings are directed to my account is odd. It's almost as
if cron is letting the perl scripts create files, but not create
filehandles to them. The mail problem may be related to that because to
open a network socket to a SMTP server requires a type of filehandle.

    Thanks in advance...

-------------------------------------------------------------
The fact that no one understands you doesn't mean you're an artist.
Brent Williams / GDNO 1-800-281-8396 ext 7390
PGP Key -- http://www.palenaka.com/pgp/palenaka.asc
-------------------------------------------------------------


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


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

Date: 15 Nov 1999 11:05:14 -0500
From: Mike Wescott <Mike.Wescott@ColumbiaSC.NCR.COM>
Subject: Re: date_to_ticks
Message-Id: <x4hfinn3k5.fsf@ColumbiaSC.NCR.COM>

tilmanglotzner@my-deja.com writes:

> I need and inverse operation to localtime whichs converts a time given
> $Year,$month,$day,$hour,$min,$sec) back to ticks. I did not found a
> function in perl which does that. Can it be done anyway ?

There's timelocal() or POSIX:mktime().

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: 15 Nov 1999 16:23:31 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Generating pi
Message-Id: <80pc23$7k3$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Anno Siegel
<anno4000@lublin.zrz.tu-berlin.de>],
who wrote in article <80on94$usd$1@lublin.zrz.tu-berlin.de>:
> >This one is quite fast, and will print out all the digits of pi:

> >    perl -we 'print "3."; {redo if print int rand 10}'

> True if and only if pi contains infinitely many copies of each
> possible digit.  Is that known about pi?

Why do you think this script will print infinitely many copies of each
possible digit?  Perl's rand() is not necessarily mapping to C rand(),
you know...

Ilya


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

Date: 15 Nov 1999 15:06:45 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help (back for guru): using setsid() to invoke dissassociated child -
Message-Id: <80p7i5$v74$1@lublin.zrz.tu-berlin.de>

Ryan T. Rhea <zzrhear@pobox.winthrop.edu> wrote in comp.lang.perl.misc:
>Using setsid() worked wonderfully in getting ppp to run as a
>disassociated "daemon" (Refer to previous post 'Help: Struggling with
>fork').  I can now kill my invoking parent shell and have ppp continue
>in a separate process.
>
>However, the same process doesn't work when bash or sh is invoked as the
>child.   Killing the parent still kills the child if it is a shell.
>What am I missing?  I wonder if I could double fork bash instead...  I
>don't know how to do that, yet.  }8>)
>
>Also, why are certain environmental variables apparently not set under
>the invoked shell?  My path does not appear to be set, and there exist
>some other, stranger effects.
>
>As mentioned in the previous post, I am invoking my perl program from
>the 'shell' field of '/etc/password'.  When the specified users logon,
>secure runs and is supposed to vanish and leave bash running (after
>performing several other tasks).

Well, first of all, can't you simply exec() your shell from the perl
process?

Otherwise, the double fork is really a simple maneuver.  You fork
a subprocess (parent exits).  The child forks again and exits, while
the grandchild exec's the shell.

Anno



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

Date: Mon, 15 Nov 1999 14:25:25 GMT
From: xavier10@die.spammers.hotmail.com (Mr. X)
Subject: Re: Help With CyberCash....
Message-Id: <383016c9.942565@news.cois.on.ca>

Brian,
Yes I have read ALL the documentation and was on the line with
CyberCash for days. Heck, they could not do it...I'm wondering if it
can be done, and if so, how. I have tried everything that CyberCash
has asked me to with no luck....

Brandon.




On Fri, 12 Nov 1999 19:40:18 -0500, brian@smithrenaud.com (brian d
foy) wrote:

>In article <382c5a6f.102501068@news.cois.on.ca>, xavier10@die.spammers.hotmail.com (Mr. X) posted:
>
>> This has been dumped in my lap this morning....not happy....
>> The company I work for just recently setup CyberCash on their secure
>> servers. It works just great, it verify the credit cards and all. BUT
>> it does not mail the merchant a verification or indication that there
>> has been a CC sale. The company wants the script to email the merchant
>> the information that CyberCash gets back from the bank. I have talked
>> extensively with CyberCash about this and they indicate it is not
>> their policy to help with stuff like this. I have modified the script
>> to mail the merchant, but I cannot find out how to include the
>> information in the email.
>> I hope someone has had experience with this, as we are going nuts here
>> trying to figure it out!
>
>have you read the various documentation sets (including the developer
>set) supplied with Cybercash?  it's all in there.



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

Date: Mon, 15 Nov 1999 15:06:14 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help with Stoopid Nutscrape (Netscape)
Message-Id: <38302152.469389@news.skynet.be>

H. Merijn Brand wrote:

>Hoe is het om getrouwd te zijn?

That's not a Perl question.

-- 
	Bart.


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

Date: 15 Nov 1999 06:47:01 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Help: Struggling with fork
Message-Id: <m1k8njg6ca.fsf@halfdome.holdit.com>

>>>>> "Bill" == Bill Moseley <moseley@best.com> writes:

Bill> perldoc perlipc has a section on this:

Bill> "Complete Dissociation of Child from Parent"

Also known as "Getting init to adopt your grandkids by outliving
your children".

:-)

print "Just another Perl hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 15 Nov 1999 07:23:12 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: How can I test CGI-Perl locally on PC ??
Message-Id: <MPG.1299c539fa5e762b98987c@nntp1.ba.best.com>

Azrul Alwi (aalwi@waumail.com) seems to say...
> Is there anyway to test CGI-Perl locally on PC before uploading it ..?

Sure

http://www.deja.com will show you how often this question is asked.

perldoc perfaq9 has a bunch of stuff on testing perl/cgi

After checking deja you will see that many people just install a web 
server locally.  Many servers can be used free of charge and they can be 
found by searching the web.

Have fun.

-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Mon, 15 Nov 1999 06:20:35 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: HTML Perl Convert Command,
Message-Id: <MPG.1299b68e503b6abc989878@nntp1.ba.best.com>

Adam Chaney (achaney1@san.rr.com) seems to say...
> I need a command that will take a string and escape all of the things like
> spaces in %20 and other characters that html screws up,

use CGI
$escaped = CGI::escape( $string );
$unescaped = CGI::unescape( $escaped );


> I can't use a string
> in a searcharg because netscape won't do it for me!!!!!! Internet Exploder
> WILL!!! so I need this command or I can't pass a string in a search in
> netsrape with out it cutting of the remaning string.

Sorry, I don't follow what you are saying.

> Please email me the response.

please email me $50.

-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: 15 Nov 1999 16:41:31 +0000 (GMT)
From: Ben Evans <bene@chiark.greenend.org.uk>
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <FDn*U3ado@news.chiark.greenend.org.uk>

In article <80c9sn$ffg$1@pegasus.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>Ben Evans  <bene@chiark.greenend.org.uk> wrote:
>>
>>Why are soft references considered a Bad Idea?
>
>http://www.plover.com/~mjd/perl/varvarname.html
>http://www.plover.com/~mjd/perl/varvarname2.html1

Well, I had a read. Then I had a think. Then some more
of a read and a bit more think.

So the basic problems are:
* that they're global variables
* that if you went to sleep and forgot what you're
  doing, you might accidentally do something stupid, ie
  blow away something you really wanted or call the wrong
  subroutine or get a run-time error.

So for quick and dirty scripts of up to a few hundred lines
where I pretty much know exactly what I want to be doing,
and I'm not depending on user input in any but the most
restricted way, there's no real problem[1] with soft references?

Kitty
[1] A real problem being something along the lines of "it'll
thrash performance really badly" or "the syntax is icky and
contains gotchas that still trip up even relatively experienced
programmers" 
--
Ben Evans (bene@chiark.greenend.org.uk)
Just Another Evil-Policy Wielding Politely Frivolous High Density Random
Blonde Perl-Hacking Dilated-Eyed Gonzo Nancy Geek Kitten-Boy


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

Date: 15 Nov 1999 16:53:07 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <slrn830ejj.2aj.simon@othersideofthe.earth.li>

Ben Evans (comp.lang.perl.misc):
>So for quick and dirty scripts of up to a few hundred lines
>where I pretty much know exactly what I want to be doing,
>and I'm not depending on user input in any but the most
>restricted way, there's no real problem[1] with soft references?

Put it the other way. Why do you want to use these rather than a hash?
Choose the path of least resistence.

-- 
At the source of every error which is blamed on the computer you will find
at least two human errors, including the error of blaming it on the computer.


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

Date: Mon, 15 Nov 1999 16:23:59 GMT
From: Nigel W <nigel_williams@my-deja.com>
Subject: Making a Perl/Tk standalone executable
Message-Id: <80pc2q$7ii$1@nnrp1.deja.com>

Does anyone know if it's possible to make a wrapper for a Perl/Tk
script so that it can run on a system which doesn't have Perl/Tk
installed.

The reason for this is to generate software/Oracle DB installation
scripts with a nice GUI which I can use on any Solaris box without
having to install Perl/Tk.

Any help appreciated,

Thanks

Nigel




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


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

Date: Mon, 15 Nov 1999 07:15:30 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: Making http requests with extra headers
Message-Id: <MPG.1299c36f31d1a24998987a@nntp1.ba.best.com>

Eduardo =?iso-8859-1?Q?Hern=E1ndez?= Gil (eh57@tid.es) seems to say...
>   I want to make a request of some web pages and store then on the disk
> using perl, but I don't know how. The main problem is that, apart from
> the normal request header I have to send some extra info in the header:
> cookies and some "post" information send by a form.

LWP will do all this.
perldoc LWP
perldoc lwpcook
perldoc HTTP::Headers



-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Mon, 15 Nov 1999 10:31:30 -0500
From: "Erick Jensen" <erick.jensen@unisys.com>
Subject: mSQL/Perl
Message-Id: <80p90l$o3b$1@mail.pl.unisys.com>

I am writing a Perl program that inserts data into a mSQL database.  The
first field in the table I am inserting into is an ID field (just a integer
I use as a primary key) which gets incremented with each new record.  When I
insert a new record into the table I want to get the highest ID and add 1 to
that to make it the ID of the new record.  Is there any easy way to do this?
Also if two users are using the program and performing the same operation
simultaneously, will there be a conflict (since the ID must be unique)?
Most SQL databases support transactions which will take care of this.
Please advise.

-Erick Jensen




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

Date: 15 Nov 1999 14:06:42 GMT
From: info@perlscan.com
Subject: New Perl and CGI Resource site
Message-Id: <80p41i$q8c$5@nntp8.atl.mindspring.net>

Hi Guys and Gals,

Just trying to get a new CGI Search Engine filled up.
Please post any scripts you have written to CGIScan at
http://cgiscan.com

and check out http://perlcoders.com if yer bored.

thanks  =)

William




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

Date: 15 Nov 1999 14:56:36 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <80p6v4$3fd$2@info2.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 08 Nov 1999 15:06:44 GMT and ending at
15 Nov 1999 07:54:34 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  206 (44.9% of all posters)
Articles: 315 (19.3% of all articles)
Volume generated: 470.3 kb (17.1% of total volume)
    - headers:    228.1 kb (4,830 lines)
    - bodies:     239.1 kb (8,403 lines)
    - original:   183.7 kb (6,656 lines)
    - signatures: 2.8 kb (72 lines)

Original Content Rating: 0.768

Averages
========

Posts per poster: 1.5
    median: 1.0 post
    mode:   1 post - 146 posters
    s:      1.3 posts
Message size: 1528.8 bytes
    - header:     741.5 bytes (15.3 lines)
    - body:       777.3 bytes (26.7 lines)
    - original:   597.2 bytes (21.1 lines)
    - signature:  9.0 bytes (0.2 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

    7     5.2 (  4.5/  0.7/  0.7)  "Jean-Patrick Madelon" <balance08@bow.intnet.mu>
    6    12.4 (  3.5/  8.9/  7.1)  Ben Osman <ben@smooth.co.uk>
    6     9.1 (  4.2/  4.9/  1.3)  Seshadri <seshadri@ptc.com>
    5     6.4 (  3.6/  2.8/  1.7)  tony_123@my-deja.com
    5     6.0 (  3.5/  2.5/  1.3)  timfi@my-deja.com
    4     3.7 (  2.7/  0.9/  0.7)  kazz@ashernet.net (Kazz Asher)
    4     7.8 (  3.5/  4.3/  2.6)  dthusma@home-del.com
    4     5.5 (  2.8/  2.7/  1.4)  teknik2000@my-deja.com
    4     7.3 (  3.1/  4.2/  4.2)  "Ryan T. Rhea" <zzrhear@pobox.winthrop.edu>
    4     4.5 (  3.1/  1.4/  1.0)  Qinqiang Sun <qsun@kitco.com>

These posters accounted for 3.0% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  12.4 (  3.5/  8.9/  7.1)      6  Ben Osman <ben@smooth.co.uk>
   9.6 (  2.8/  6.8/  3.2)      4  mpm@unix2.megsinet.net (www.www2.internetpros.com)
   9.1 (  4.2/  4.9/  1.3)      6  Seshadri <seshadri@ptc.com>
   7.8 (  3.5/  4.3/  2.6)      4  dthusma@home-del.com
   7.4 (  2.4/  4.9/  3.5)      3  salvadorej@my-deja.com
   7.3 (  3.1/  4.2/  4.2)      4  "Ryan T. Rhea" <zzrhear@pobox.winthrop.edu>
   7.2 (  2.8/  4.4/  3.2)      3  visigothe <octothorpe12NOocSPAM@yahoo.com.invalid>
   6.8 (  1.4/  5.4/  4.2)      2  "Brian Landers" <bcl914@bellsouth.net>
   6.7 (  3.2/  2.6/  2.1)      4  yanick1@sympatico.ca (Yanick Champoux)
   6.5 (  2.2/  4.1/  1.6)      4  chesta@brown.edu (Rob Manchester)

These posters accounted for 2.9% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  4.2 /  4.2)      4  "Ryan T. Rhea" <zzrhear@pobox.winthrop.edu>
1.000  (  0.7 /  0.7)      7  "Jean-Patrick Madelon" <balance08@bow.intnet.mu>
1.000  (  4.5 /  4.5)      3  one12@usa.net (jim)
0.843  (  1.6 /  1.9)      3  "Crawfishy" <cans1@hotmail.com>
0.803  (  2.1 /  2.6)      4  yanick1@sympatico.ca (Yanick Champoux)
0.795  (  7.1 /  8.9)      6  Ben Osman <ben@smooth.co.uk>
0.780  (  0.7 /  0.9)      4  kazz@ashernet.net (Kazz Asher)
0.776  (  3.1 /  3.9)      3  "John Wong" <jonwon@catcha.com>
0.729  (  3.2 /  4.4)      3  visigothe <octothorpe12NOocSPAM@yahoo.com.invalid>
0.724  (  1.0 /  1.4)      4  Qinqiang Sun <qsun@kitco.com>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.600  (  1.5 /  2.5)      3  Mike Ryan <mryan@kc4.so-net.ne.jp>
0.528  (  1.4 /  2.7)      4  teknik2000@my-deja.com
0.503  (  1.3 /  2.5)      5  timfi@my-deja.com
0.503  (  1.3 /  2.5)      3  FASE Andrew <andrew.fase@stud.umist.ac.uk>
0.469  (  3.2 /  6.8)      4  mpm@unix2.megsinet.net (www.www2.internetpros.com)
0.390  (  0.9 /  2.3)      4  ssriperu@yahoo.com
0.387  (  1.6 /  4.1)      4  chesta@brown.edu (Rob Manchester)
0.350  (  1.3 /  3.8)      3  gkl200 <gkl200@my-deja.com>
0.274  (  0.6 /  2.2)      3  "Steve Protopapas" <steve@corp.airmedia.com>
0.266  (  1.3 /  4.9)      6  Seshadri <seshadri@ptc.com>

26 posters (12%) had at least three posts.


Top 10 Crossposters
===================

Articles  Address
--------  -------

       4  Eugene Grosbein <eugen@svzserv.kemerovo.su>
       3  Aparna Ramachandran <aparnar@imap4.asu.edu>
       2  crash_abort@bolek.com
       2  dthusma@home-del.com
       2  "Wil \"Spock\" Weterings" <weterings@schiphol.nl>
       1  Shlomit Afgin <vshlomit@wicc.weizmann.ac.il>
       1  Keith Newton <keith.newton@grafica.co.nz>
       1  mpm@unix2.megsinet.net (www.www2.internetpros.com)
       1  ltawfall@my-deja.com
       1  jkort@wimberley-tx.com


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

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


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