[9576] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3170 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 15 21:08:26 1998

Date: Wed, 15 Jul 98 18:00:48 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 15 Jul 1998     Volume: 8 Number: 3170

Today's topics:
        Connecting to MS Access DB on NT from Linux/Apache <cgi-bin@mindspring.com>
        CRYPT on win32 <mudd97@nac.net>
        Determining the number of the last line that was execut <surendra@asic.sc.ti.com>
        die() not calling exit() with ($?>>8) as perlfunc impli eryq@zeegee.com
    Re: efficiency: print<<"xxx" vs. print (Alan Barclay)
        Execution and Replacement Question. <joshi@ee.tamu.edu>
    Re: Execution and Replacement Question. (Matt Knecht)
    Re: Grand Chicago.pm MegaMeeting Celebrated! (David Adler)
    Re: Help with this regex: s/(foo)([^l])/$1x$2/g <uri@sysarch.com>
    Re: HELP: Programming Question (David Adler)
    Re: How to tell if a scalar is a number? (Kelly Hirano)
    Re: How to tell if a scalar is a number? (Craig Berry)
    Re: m//g strange behaviour ? <rick.delaney@shaw.wave.ca>
        mail bomber source code for perl. <matthew@nofear.hjsoft.com>
    Re: More musing on -w <rpsavage@ozemail.com.au>
        newbe- execute command on server--- <user@informatics.net>
        OLE under Win32 (John M. Dlugosz)
        perl 5.004_04 SCO OS5.04 DynaLoad and %ENV <gclark@iconnect.net>
    Re: Q: Changing IP address via perl <green@imaginet.fr>
    Re: Recipient Validation (Abigail)
    Re: Recipient Validation (Abigail)
    Re: Restricting refering domains access to script? <domainsource@usa.net>
    Re: Restricting refering domains access to script? <cgi-bin@mindspring.com>
    Re: use strict (Craig Berry)
        What is awk better at than perl? (Larry quote) (Brock Sides)
    Re: Working with Frame (brian d foy)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 15 Jul 1998 17:18:18 -0400
From: "Doug Younger" <cgi-bin@mindspring.com>
Subject: Connecting to MS Access DB on NT from Linux/Apache
Message-Id: <6oj6jq$5m6$1@camel15.mindspring.com>

Hello,

I'm pulling my hair out over this... I can't seem to find a straight answer
on how to do this...

I need to be able to query and insert data into a MicroSoft Access DB on a
NT 4.0 server  from a Linux (Debian 1.2/2.0.34) machine using perl.
(preferably perl, other methods could be considered)

I've seen references to DBI, DBD::ODBC, and win32 modules and I'm not sure
what is needed where. I've also seen some FAQ's that say it's not possible
to access a remote server using DBI.

(I'm kind of hoping it's not possible so I can tell "them" that it can't be
done and I can move the DataBase to PostgreSQL on the linux box).

Please reply to cgi-bin@midnspring.com

Thanks,
  -Doug




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

Date: Wed, 15 Jul 1998 23:55:19 GMT
From: "Brian Moffatt" <mudd97@nac.net>
Subject: CRYPT on win32
Message-Id: <Hjbr1.72$tb5.1503037@nntp1.nac.net>

Why do I get a "paranoia" message when trying to use the crypt function

Thanks
Brian




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

Date: Wed, 15 Jul 1998 17:47:01 -0500
From: Surendra Pothuru <surendra@asic.sc.ti.com>
Subject: Determining the number of the last line that was executed by eval
Message-Id: <35AD3165.FEAB00AF@asic.sc.ti.com>

file_1 has code which calls perl subroutines, contained in file_2.
file_2 is a perl program. While executing file_2, I read file_1 into a
variable and do an eval on that variable.

If code that is being executed by eval, detects an error, then that code
does an exit.

Is there a mechanism to detect the number of the last line of file_1
that was executed by eval.

--
Surendra Pothuru
ASIC Product Development
Texas Instruments, Dallas, TX.

Email : surendra@asic.sc.ti.com
Voice : (972) 480-1352





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

Date: Thu, 16 Jul 1998 00:32:08 GMT
From: eryq@zeegee.com
Subject: die() not calling exit() with ($?>>8) as perlfunc implies?
Message-Id: <6ojhm9$iaa$1@nnrp1.dejanews.com>

On HP/UX 10, Perl 5.00404:

  #!/usr/bin/perl -w
  # This should pass the exit status to the shell, but doesn't!";
  open LS, "ls /no/such/dir |" or die "open: $!\n";
  my @ls = <LS>;
  close LS;
  ($? >> 8) and die "ls failed: [$!][",($?>>8),"]\n";

Under /bin/sh, when I do this:

	ls /no/such/dir
	echo $?

It prints 2, but when I run the above program...

	piper
	echo $?

It prints 0, even though Perl reports $?>>8 faithfully as 2, and $! is
not set!  If I explicitly 'exit 2' from Perl I get what you'd
expect... $? is set to 2 in the shell.

What am I missing here?  This seems to contradict perlfunc's die().

Eryq.







-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 16 Jul 1998 00:08:51 GMT
From: gorilla@elaine.drink.com (Alan Barclay)
Subject: Re: efficiency: print<<"xxx" vs. print
Message-Id: <900547729.981543@elaine.drink.com>

In article <wku34kp087.fsf@turangalila.harmonixmusic.com>,
Dan Schmidt  <dfan@harmonixmusic.com> wrote:
>rjking@blue.seas.upenn.edu (Rachel J King) writes:
>I didn't see any difference when I tried it.
>
>====
>
>use Benchmark;

There are two sorts of efficiency, 'use Benchmark;' can only measure
the easy one, how long does the program take to run. The second sort,
how long does the program take to develop and maintain, is much harder
to benchmark, but my personal feeling is that a here document is going
to be much easier to maintain.


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

Date: Wed, 15 Jul 1998 17:39:24 -0500
From: Sanjay Joshi <joshi@ee.tamu.edu>
Subject: Execution and Replacement Question.
Message-Id: <Pine.SOL.3.96.980715173813.28418G-100000@eesun1.tamu.edu>

Hi,
	I have a set of statements. 

$dates = `date`; 
print OUTPUT ("$dates");



How do I compress this to just one line to make it concise?


Sanjay

------------------------------------------------------------------------
Sanjay Joshi                                   http://ee.tamu.edu/~joshi
News Page:			     http://ee.tamu.edu/~joshi/news.html
------------------------------------------------------------------------



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

Date: Wed, 15 Jul 1998 23:16:49 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Execution and Replacement Question.
Message-Id: <BLar1.144072$on1.6590898@news2.voicenet.com>

Sanjay Joshi <joshi@ee.tamu.edu> wrote:
>$dates = `date`; 
>print OUTPUT ("$dates");
>How do I compress this to just one line to make it concise?

print OUTPUT scalar localtime, "\n";

Is what I would do, but, if you have a real need to output the date
exactly as your system does, and don't mind forking:

print OUTPUT `date`;

Check up on perlfaq5, specifically 'Quote and Quote-like Operators', to
see the various behaviours of the different methods of quoting.

-- 
Matt Knecht - <hex@voicenet.com>
"496620796F752063616E207265616420746869732C20796F7520686176652066
617220746F6F206D7563682074696D65206F6E20796F75722068616E6473210F"


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

Date: 15 Jul 1998 23:24:45 GMT
From: dha@panix.com (David Adler)
Subject: Re: Grand Chicago.pm MegaMeeting Celebrated!
Message-Id: <6ojdnt$487@news1.panix.com>

First of all, let me point out that you seem to be very silly people.
This is the Perl Mongers Way, i. e. a good thing (tm).

On 14 Jul 1998 22:17:45 -0500, Tushar Samant <scribble@pobox.com> wrote:
>drifted to various other topics until it was realized
>that Perl should also get talked about.

Hmm... I wonder if there will be any .pm meetings without Perl
discussions.  I don't think ny.pm has managed it, and we've been
around longest.  Oh, wait, maybe at the pre-godzilla party...

>survive, and whether the beta will be out tomorrow.

Good call! :-)

>The meeting was adjourned late in the evening, after
>the waitress brought the check with a three-line JAPH
>scrawled on it. It appears to be solving the halting
>problem.

You will post this, of course?  Not to mention recruiting the
waitress...

Good Work!

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"I was under medication when I made the decision not to burn the
tapes." - President Richard Nixon


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

Date: 15 Jul 1998 20:50:09 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Help with this regex: s/(foo)([^l])/$1x$2/g
Message-Id: <x7zpeamxfi.fsf@sysarch.com>

>>>>> "SL" == Stephen Lee <- Post replies please <nobody@nowhere.net>> writes:

  SL> I am surprised [^;] matches $ (end of line) too.  I need getting
  SL> more used to perl.

yes you do.

[^;] matches ANY char that is not a ;

this includes \n. it is not matching $ which is not a char but an anchor
which is either the end of the string or before a \n.

  SL> $ perl -p -e 's/(foo)([^l])/$1x$2/g'
  SL> foo
  SL> foox
  SL> foobar
  SL> fooxbar

perl -p -e 's/(foo)([^l\n])/$1x$2/g'
foo
foo
bar
bar
foos
fooxs
foozzz
fooxzzz

this does what you want.

also there are other techniques like:

perl -p -e 's/(foo)(?!l)/$1x/g'
foo
foox
foozzz
fooxzzz
fool
fool

or to check for newlines too:

perl -p -e 's/(foo)(?![l\n])/$1x/g'
foo
foo
fool
fool
foodd
fooxdd

these are better in that they don't grab the text after foo, they just
check that is it not there.

hth,

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 15 Jul 1998 23:41:03 GMT
From: dha@panix.com (David Adler)
Subject: Re: HELP: Programming Question
Message-Id: <6ojemf$487@news1.panix.com>

On Tue, 14 Jul 1998 12:09:20 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
>
>In article <35ABA90F.E684F8A6@cas-inc.com> on Tue, 14 Jul 1998 13:53:04 -
>0500, J. Paul Hill <paul.hill@cas-inc.com> says...
>> With the "while" it executes once.  If I use "while ($answer ne "no")",
>> it computes repeatedly.  What am I doing wrong?
>
>chomp the newline off the end of $answer.
>
>`perldoc -f chomp`

Or, of course (TMTOWTDI! :-):
	while ($answer !~ /^no$/i);

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Got Perl? <www.perl.com>
Got a Perl User Group? <www.pm.org>


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

Date: 15 Jul 1998 16:24:58 -0700
From: hirano@Xenon.Stanford.EDU (Kelly Hirano)
Subject: Re: How to tell if a scalar is a number?
Message-Id: <6ojdoa$4lj@Xenon.Stanford.EDU>

In article <6ojbml$lic$1@flood.xnet.com>, Paul Tomko  <tomko@xnet.com> wrote:
>I admit to being a former C programmer. I am trying to determine the
>easiest way to determine if a scalar contains all digits, or if it
>compares some non-digit characters ; without of course, printing it out
>and looking at it.

`perldoc perlfaq4`

       How do I determine whether a scalar is a
       number/whole/integer/float?

       Assuming that you don't care about IEEE notations like
       "NaN" or "Infinity", you probably just want to use a
       regular expression.

          warn "has nondigits"        if     /\D/;
          warn "not a whole number"   unless /^\d+$/;
          warn "not an integer"       unless /^-?\d+$/;  # reject +3
          warn "not an integer"       unless /^[+-]?\d+$/;
          warn "not a decimal number" unless /^-?\d+\.?\d*$/;  # rejects .2
          warn "not a decimal number" unless /^-?(?:\d+(?:\.\d*)?|\.\d+)$/;
          warn "not a C float"
              unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;

       Or you could check out
       http://www.perl.com/CPAN/modules/by-module/String/String-
       Scanf-1.1.tar.gz instead.  The POSIX module (part of the
       standard Perl distribution) provides the strtol and strtod
       for converting strings to double and longs, respectively.


-- 
Kelly William Hirano	                    Stanford Athletics:
hirano@cs.stanford.edu	                 http://www.gostanford.com/
hirano@alumni.stanford.org      (WE) BEAT CAL (AGAIN)! 100th BIG GAME: 21-20


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

Date: 15 Jul 1998 23:21:43 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How to tell if a scalar is a number?
Message-Id: <6ojdi7$hak$2@marina.cinenet.net>

Paul Tomko (tomko@xnet.com) wrote:
: I admit to being a former C programmer. I am trying to determine the
: easiest way to determine if a scalar contains all digits, or if it
: compares some non-digit characters ; without of course, printing it out
: and looking at it.

By far the easiest way to solve this problem is to read the FAQ; the
answer is there, in multiple versions depending on what kind of number
(whole, integer, real, ...) you want.

Also, a thread on precisely this topic is currently under way elsewhere in
the group; did you read the group for at least an hour or two before
posting?

Just out of curiosity, as a data point for our ongoing discussion about
newbies and FAQs, which category describes you best:

(a) This is my first day on comp.lang.perl.misc, and I've never heard
    of the Perl FAQ.
(b) I've been reading clpm for a while, but I've never heard of the
    Perl FAQ.
(c) I've heard of the Perl FAQ, but didn't think it would help me with
    my problem.
(d) I didn't know where to find the Perl FAQ.
(e) I looked in the Perl FAQ but couldn't find the answer to my
    question.
(f) I know about the FAQ and realized it might contain the answer to
    my question, but asked on clpm first.

If none of these fit, please explain what actually transpired.

Thanks in advance for your assistance with this.

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Wed, 15 Jul 1998 23:54:48 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: m//g strange behaviour ?
Message-Id: <35AD4297.FAC83F92@shaw.wave.ca>

Francois DESARMENIEN wrote:
> 
> Could someone tell me why this script:
> 
> --------------------------------------
> sub foo {
>   $_[0] =~ /\G(.)/g;
>   $1
> }
> print scalar foo('abcdef'),  foo('abcef');
> --------------------------------------
> 
> output "af" instead of "aa" that I would have expected ?
> Why the list context of second call to foo should modify
> the $_[0] =~ /\G(.)/g behaviour ?
> 

In the scalar context, $_[0] =~ /\G(.)/g matches and sets $1='a'.
It is never re-executed, so the /g here is unnecessary.  If you redo the
statement it would start where it left off and set $1='b' and so on.
Because /g knows where it left off, \G is also unnecessary in this case.

[Aside:  When is \G useful?]

In the list context, $_[0] =~ /\G(.)/g matches for each letter up to 'f'
all in one execution of the statement, finally setting $1='f'.

I hope this helps some.  I'm not sure if I explained the part you don't
get.

See m//g in perlop for more details.

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: 15 Jul 1998 23:29:45 GMT
From: Matthew Flinchbaugh <matthew@nofear.hjsoft.com>
Subject: mail bomber source code for perl.
Message-Id: <6oje19$hkh$1@butterfly.hjsoft.com>

hey does any one have the perl source code for a mail bomber?
for Linux
?

r does anyone know of any pages that have the perl or c sources to Linux
games?



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

Date: 15 Jul 1998 23:00:51 GMT
From: "Ron Savage" <rpsavage@ozemail.com.au>
Subject: Re: More musing on -w
Message-Id: <01bdb046$617ca580$43ea1286@steelres-pcm657.resmel.bhp.com.au>

See also The Perl Journal Issue # 10 (Vol 3, No. 2), p 21, under the
discussion of V 5.005.

Alan Barclay <gorilla@elaine.drink.com> wrote in article
<900537583.606828@elaine.drink.com>...
> I've been thinking more about '-w', and before I get too far into
> this message, this is all hypothetical 'what if' stuff, but:
> 
> Should -w be split into different types of warnings?
[snip]


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

Date: Wed, 15 Jul 1998 18:51:58 -0500
From: "User" <user@informatics.net>
Subject: newbe- execute command on server---
Message-Id: <6ojfoc$o5u$1@supernews.com>

I need to be able to pause a database server from anywhere.  I can currently
start and stop the service from anywhere, however this requires that all
users be out of the application. Pausing is a better solution as the users
do not have to exit the application.  At the server all i have to do is to
type the "server.exe" followed by /Pause or /Resume.  Is there an easy way
to execute this from a web page using a perl script??   If any one has
detailed instructions please let me know.....

Thanks
Chris




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

Date: Wed, 15 Jul 1998 23:54:28 GMT
From: john@dlugosz.com (John M. Dlugosz)
Subject: OLE under Win32
Message-Id: <DFBBEDD57603115A.5C01E31FAE11D7AA.AE1CCD270BEB3173@library-proxy.airnews.net>

Has anybody figured out some proper instructions for using OLE in
ActiveWare's "official" Win32 Perl?  Here's what I've figured out thus
far:  function calls return undef unless there is an "out" parameter,
and the OLE result is obtained always with the OLEGetError function.  

Sometimes the hash syntax for properties works for read/write,
sometimes it does't work and you have to use the function-call syntax
instead.  How do you write to an "indexed" property?

Alternativly, is there another Perl port out there that has Win32
support including OLE Automation?

--John



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

Date: Wed, 15 Jul 1998 14:13:45 -0500
From: gerald clark <gclark@iconnect.net>
Subject: perl 5.004_04 SCO OS5.04 DynaLoad and %ENV
Message-Id: <35ACFF69.973F9FB1@iconnect.net>

I am attempting to use Perl and Mysql.
I tried cc icc and gcc.
I am currently trying gcc 95q4 from skunkware.
If I build libperl.so, DynaLoader loads Mysql and mysql functions
properly,
but perl test op/magic.t fails. $ENV{PATH} returns nothing. 
This is verified by running:
perl -e 'print $ENV{PATH};'
which prints nothing.

If I Configure to NOT build libperl.so, %ENV works properly, but all
tests that load modules fail.

I have searched DejaNews and found nothing.
There are tons of Configure options, but since I can load modules and
access MySQL databases,
I must be close.

Does anyone know what is going on or have a working config.sh I can look
at?
Again - Perl 5.004_04 SCO Open Server 5.04 cc, icc or gcc.
Won't pass make test
Either Won't load modules, or won't return ENV variables.

Thanks.

Two addresses -
gerald_clark@sns.ca
gclark@iconnect.net


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

Date: Thu, 16 Jul 1998 00:38:57 +0200
From: Donadio <green@imaginet.fr>
To: Bullwinkle <at@whatsamattau.edu>
Subject: Re: Q: Changing IP address via perl
Message-Id: <35AD2F81.CA22769F@imaginet.fr>

Hi,

I'm using a laptop as well and this is what I do to change the machine's
IP address without rebooting.

After changing the machine's IP address and click on the "Cancel" button
when asked to reboot the computer, I use the PCcard tool found in the
Win95 config panel to "stop" the NIC. After the NIC is "stop", I extract
the NIC from the PCMCIA slot and insert it back. When the NIC
description reappeared in the PCcard tool windows, the new IP address is
enable.

Well, I'm not sure that you will understand this message, since I'm
french and my English is pretty poor, but I hope it will help you
anyway.

Cheers

Stephane DONADIO
green@imaginet.fr




Bullwinkle wrote:
> 
> I routinely move my laptop between the ethernet at work and an ethernet
> at home. I've got the changes needed down to just changing the IP
> address and rebooting. However, it's still kludgey.
> 
> 1) Is there a perl module that will let me write a script to change the
> machine's IP address?
> 2) Any conceivable way to "restart" just the ip stack, rather than the
> entire machine?
> 
> Thanks,
> pete
> 
> keleher@cs.umd.edu


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

Date: 15 Jul 1998 23:16:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Recipient Validation
Message-Id: <6ojd8l$9ld$1@client3.news.psi.net>

H.P. Buerki (webmaster@mediapromotion.ch) wrote on MDCCLXXIX September
MCMXCIII in <URL: news:35AD02BD.298D9787@mediapromotion.ch>:
++ Hi
++ 
++ how i can make for sure, that the Recipient Addresses are valid on the
++ Remote Server before i will send an E-Mail.

You can't. See the FAQ.


Next?



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Addition/s) [0]'


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

Date: 15 Jul 1998 23:18:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Recipient Validation
Message-Id: <6ojdc0$9ld$2@client3.news.psi.net>

H.P. Buerki (webmaster@mediapromotion.ch) wrote on MDCCLXXIX September
MCMXCIII in <URL: news:35AD0EC4.E167A892@mediapromotion.ch>:
++ That's not an answer !!!
++ 
++ You better don't write something than these!

Excuse me? The gentleman give you a perfect valid answer, and you
get angry? You're stupid.

++ It's possible to validate an E-Mail Address via nslookup -q=mx and check
++ trough the Servers manually via telnet an vrfy and so on.

Don't be a fool. Read the FAQ.

++ I don't think so that nobody had ever an Idea to automate this Process.


Don't be a fool. Read the FAQ.




Abigai;
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Wed, 15 Jul 1998 19:06:46 -0400
From: "David Thompson" <domainsource@usa.net>
Subject: Re: Restricting refering domains access to script?
Message-Id: <6ojcf2$dlv$1@winter.news.erols.com>

Is $domain automatically the referring domain of a form submission?

I know how to deal with it once I find out that the script is being run
from another domain (kindly point them to my site), but is that the
correct way to find out if the form is submitted in a certain domain?

Thanks.

David


brian d foy wrote in message ...
>In article <6ojb4t$64l$1@winter.news.erols.com>, "David Thompson"
<domainsource@usa.net> posted:
>
>>In a Unix perl script I want to (inside the script, not in the server
>>config) restrict the referring domains that can access a script.  Is
>>that possible?
>
>   die if exists $killed_domains{$domain};
>
>or you can be less drastic, but that's the idea.
>
>good luck ;)
>
>--
>brian d foy                                  <comdog@computerdog.com>
>CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
>Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
>Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>




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

Date: Wed, 15 Jul 1998 19:42:54 -0400
From: "Doug Younger" <cgi-bin@mindspring.com>
Subject: Re: Restricting refering domains access to script?
Message-Id: <6ojf30$s6$1@camel15.mindspring.com>

Hello,
$ENV{REMOTE_HOST} is the machine where the end user is sitting at... (or
$ENV{REMOTE_ADDR} for IP address.
 If you want where the script was called from (from a web page not on the
same server), which I doubt is the case, but just in case, use:
$ENV{HTTP_REFERER} will need to split out the server portion as it contains
the entire URL.

-Doug

David Thompson wrote in message <6ojcf2$dlv$1@winter.news.erols.com>...
>Is $domain automatically the referring domain of a form submission?
>
>I know how to deal with it once I find out that the script is being run
>from another domain (kindly point them to my site), but is that the
>correct way to find out if the form is submitted in a certain domain?
>
>Thanks.
>
>David
>
>
>brian d foy wrote in message ...
>>In article <6ojb4t$64l$1@winter.news.erols.com>, "David Thompson"
><domainsource@usa.net> posted:
>>
>>>In a Unix perl script I want to (inside the script, not in the server
>>>config) restrict the referring domains that can access a script.  Is
>>>that possible?
>>
>>   die if exists $killed_domains{$domain};
>>
>>or you can be less drastic, but that's the idea.
>>
>>good luck ;)
>>
>>--





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

Date: 15 Jul 1998 23:07:39 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: use strict
Message-Id: <6ojcnr$hak$1@marina.cinenet.net>

Steve Linberg (linberg@literacy.upenn.edu) wrote:
: In article <6oj4eu$5gg$3@marina.cinenet.net>, cberry@cinenet.net (Craig
: Berry) wrote:
: 
: > Use of braces as qw delimeters seems a bit potentially misleading
: > (though perfectly OK, of course).
: 
: Yeah, but Tom uses them!  :)

And if Tom jumped off a cliff...? :)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Wed, 15 Jul 1998 19:40:16 -0500
From: opus@magibox.net (Brock Sides)
Subject: What is awk better at than perl? (Larry quote)
Message-Id: <opus-1507981940170001@dave.magibox.net>

I've seen the quote from Larry Wall (at
http://www.perl.org/lwall-quotes.txt) "Hey, I had to let awk be better at
*something*... :-)"

So what is it that awk is (or was) better at?

-- 
Brock Sides opus@magibox.net http://www.magibox.net/~brock/
for(0..4){$humps="."x($_*2+1);$camel.="($humps)"}
"Jtsutona reP reh\nrekcah l"=~/$camel/s;
for(1..5){eval"print scalar reverse \"\$$_\""};


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

Date: Wed, 15 Jul 1998 20:31:12 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Working with Frame
Message-Id: <comdog-ya02408000R1507982031120001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35ACAA91.112C061@uea.ac.uk>, Rattasit Sukhahuta <R.Sukhahuta@uea.ac.uk> posted:

>Is there a perl command to send an output to different frame?  The
>problem that I have is when I use the following command,

the answer can *still* be found in the CGI Meta FAQ no matter
how many times it is asked ;)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3170
**************************************

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