[16658] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4070 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 20 06:05:58 2000

Date: Sun, 20 Aug 2000 03:05:15 -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: <966765915-v9-i4070@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 20 Aug 2000     Volume: 9 Number: 4070

Today's topics:
    Re: Beginer help with "hello" syntax. <bwalton@rochester.rr.com>
        Beginner question on $! <patlkg@ctimail.com>
    Re: Beginner question on $! (Marcel Grunauer)
    Re: Can't get a simple GETHOSTBYADDR() to work (David Efflandt)
        cant tell is /DBD/mysql.pm is loaded correctly ?? <yamar420@my-deja.com>
    Re: cant tell is /DBD/mysql.pm is loaded correctly ?? <jeff@vpservices.com>
        Check for Installed Modules (BUCK NAKED1)
    Re: Check for Installed Modules (Marcel Grunauer)
        DBI has me stumped... maybe OO problem? <dale@emmons.dontspamme.com>
    Re: DBI has me stumped... maybe OO problem? <callgirl@la.znet.com>
    Re: DBI has me stumped... maybe OO problem? (Neil Kandalgaonkar)
        Estimating the importance of inputs to an ANN <jdb@wcoil.com>
    Re: hey, i need help, im trying to get what email = fro <jeff@vpservices.com>
    Re: hey, i need help, im trying to get what email = fro <mc@backwoods.org>
        hey, i need help, im trying to get what email = from ww mattman055@my-deja.com
    Re: hey, i need help, im trying to get what email = fro (Brian Delaney)
        How to know when the client close the browser <kyeung@acae.cuhk.edu.hk>
    Re: How to know when the client close the browser <no@email.for.me>
    Re: How to know when the client close the browser <elephant@squirrelgroup.com>
    Re: How to know when the client close the browser (Marcel Grunauer)
        How to pass the NTLM authentication of IIS using perl gerhard_wu@my-deja.com
    Re: I need help with ffa links script <gellyfish@gellyfish.com>
        installation help required ... Window 98 based <MENZpage@MENZpage.com>
        Localize "require" to subdomain <zikeweb@earthlink.net>
    Re: London £30-35K Perl Programmers Required <dale@emmons.dontspamme.com>
    Re: Moving CPAN Modules from Windows NT to Linux <jamesht@idt.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 20 Aug 2000 01:32:34 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: Beginer help with "hello" syntax.
Message-Id: <399F3563.B1C804B2@rochester.rr.com>

"Anthony E. Coley" wrote:
> 
> Could someone tell me what's wrong with my script?  It works if I enter
> anthony, but if I try an arbitrary name I get stuck in the
> "Wrong, try again.  What is the secret word? "  loop.  I'm going by
> O'Reilly's "learning Perl" book 1993 and I'm using perl-5.00503-10
> for Liunx and per-5.6.0.616 WinNT and both systems behave the
> same.  If I set the @words aray to only "camel" it work correctly, but
> with multiply values it fails.
> 
> Thanks,
> 
> Anthony
> 
> #!/usr/bin/perl
> 
> @words = ("camel","llama","oyster");
> print "What is your name? ";
> $name = <STDIN>;
> chop($name);
> if ($name eq "anthony") {
>     print "Hello, $name!  How good of you to be here!\n";
> } else  {
>         print "Hello, $name!\n";
>         print "What's the secret word? ";
>         $guess = <STDIN>;
>         chop($guess);
>         $i = 0;
>         $correct = "maybe";
>         while ($correct eq "maybe") {
>             if ($words[$i] eq $quess) {

Try replacing $quess with $guess in the above line.  It will probably do
what it is supposed to do then.  You can catch such stuff by using the
-w switch in your Perl command line and/or

   use strict;

both of which are very good ideas.  Of course, use strict; will require
the predeclaration of all variables you use with "my".

>                print "I've made it this far\n";
>               ##  print "$words[$i] and $guess\n";
>                print "You got it\n";
>                $correct = "yes";
>             } elsif ($i < 2) {
>                 $i = $i + 1;
>             } else {
>                 print  "Wrong, try again.  What is the secret word? ";
>                 $guess = <STDIN>;
>                 chop($guess);
>                 $i = 0;
>             }
>     } # end of while not correct
> } # end of anthony
-- 
Bob Walton


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

Date: Sun, 20 Aug 2000 17:27:43 +0800
From: Patrick Lau <patlkg@ctimail.com>
Subject: Beginner question on $!
Message-Id: <399FA48F.CFDABE61@ctimail.com>

Hello:

I have the code like that,

$a="hello.txt";
open(A, $a);
if ($! != 0) {
  print "No!\n";
  open (A, ">$a");
#do somthing next only $a not exist

 close A;
}

this work fine on Win32 platform but don't
produce the same result on Unix base platform.
How can I make it to work in Unix base platform
and how can I make my Win32 perl to behaviour
more silimar to Unix base perl. As I mainly work
on Win32 platform but have to port the cgi script
back to Unix base platform.

thanks



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

Date: Sun, 20 Aug 2000 09:47:01 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: Beginner question on $!
Message-Id: <slrn8pva8g.249.marcel@gandalf.local>

On Sun, 20 Aug 2000 17:27:43 +0800, Patrick Lau <patlkg@ctimail.com>
wrote:

>I have the code like that,
>
>$a="hello.txt";
>open(A, $a);
>if ($! != 0) {
>  print "No!\n";
>  open (A, ">$a");
>#do somthing next only $a not exist
>
> close A;
>}

What do you expect this to do?

I can only guess: If you want to create a file only if it doesn't exist
yet, try

    my $a = "test.txt";
    unless (-e $a) {
	open (A, ">$a") or die "can't create $a: $!\n";
	# now print something to A
	close A;
    }

$! will contain the error message if something went wrong. Read about
it in perlvar. It will not be set if the file merely exists, but can be
opened ok.

I hope this is what you meant...

-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Sun, 20 Aug 2000 06:37:56 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Can't get a simple GETHOSTBYADDR() to work
Message-Id: <slrn8puv62.6s5.efflandt@efflandt.xnet.com>

On Sat, 19 Aug 2000 22:30:50 GMT, Steve Borruso <sborruso@stny.rr.com> wrote:
>Thank you  for the clarification. My problem  appears to go a little deeper than
>gethostbyaddr.
>Any assistance or pointers to other news groups for an answer would be greatly
>appreciated .......
>
>I am parsing image urls from html pages and later making decisions upon the
>hostname in the url.

You can parse out the hostname, but if you change anything at all in the
URL, you may get something different than you expect.

Apparently you do need a basic understanding about how HTTP works. Virtual
hosts will sometimes have many hosts on one IP address and the webserver
will respond based on the Host header sent by the browser.  Reverse lookup
may also give an entirely different name.  If you start changing the
hostname in URLs, you may get a different website than you expect.

So you would be best off to leave the URLs like they are, even if you
parse out the hostname or IP for some reason.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: Sun, 20 Aug 2000 03:59:15 GMT
From: wrong planet ? <yamar420@my-deja.com>
Subject: cant tell is /DBD/mysql.pm is loaded correctly ??
Message-Id: <8nnl2c$d57$1@nnrp1.deja.com>

Does anyone know of a way to tell if you have the msql.pm installed
correctly ? thx for any help.. yamar



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


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

Date: Sat, 19 Aug 2000 21:38:41 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: cant tell is /DBD/mysql.pm is loaded correctly ??
Message-Id: <399F60D1.D2802FD@vpservices.com>

wrong planet ? wrote:
> 
> Does anyone know of a way to tell if you have the msql.pm installed
> correctly ? thx for any help.. yamar

Your subject line says "mysql" and your text says "msql" those are two
completely different things although they are both accessed the same via
Perl.  Let's assume you mean mysql, if not, substitute 'msql' where I
have 'mysql' below.

First make sure that MySQL (the database) is itself installed and
running and accessible with a given username and password by accessing
it directly (see the MySQL docs if you don't know how to do that).  Then
try a short script like this to test your DBI connection to mysql:

#!/usr/local/bin/perl -w
use strict;
use DBI;
my $database = 'name of your database';
my $user     = 'name of user who has access to that database';
my $pass     = 'password of that user';
my $dbh = DBI->connect( 
    "dbi:mysql:$database",
    $user,
    $pass,
    {RaiseError=>1}
);
print "Hooray!";

If that prints "Hooray!", then you're all set.  If not, look at whatever
error message you get, and correct the error.  If you can't figure out
what the error message means, write back showing us what you tried and
what the error message was.

-- 
Jeff


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

Date: Sun, 20 Aug 2000 01:46:23 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Check for Installed Modules
Message-Id: <6883-399F7EBF-102@storefull-244.iap.bryant.webtv.net>

Does anyone have a perl script that checks to see what modules are
installed on a webserver? I need it in a perl script that doesn't
require any modules. I think ExtUtils::Installed will do this, but after
unzipping it, I can't install it. Thanks

--Dennis
"Let's get back to Perl, shall we?"



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

Date: Sun, 20 Aug 2000 09:34:59 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: Check for Installed Modules
Message-Id: <slrn8pv9h7.249.marcel@gandalf.local>

On Sun, 20 Aug 2000 01:46:23 -0500 (CDT), BUCK NAKED1
<dennis100@webtv.net> wrote:

>Does anyone have a perl script that checks to see what modules are
>installed on a webserver? I need it in a perl script that doesn't
>require any modules. I think ExtUtils::Installed will do this, but after
>unzipping it, I can't install it. Thanks



Basically, you'll want to search the paths in the @INC variable for files
ending in .pm . Of course, you might have more modules installed in a
private library directory; if so, you need to include those in @INC as
well (just use push() or unshift() ).

For use on the command-line, there is the pminst program,
part of pmtools written by Tom Christiansen. Download it from
http://doriath.perl.com/misc/pmtools-1.00.tar.gz

Or, for use over CGI, you could use the following program, adapted by
yours truly from the original version by Dave Cross, which will tell
you all sorts of things about the perl installation on that site:

    #!/usr/bin/perl -w

    use strict;
    use CGI qw/:standard/;
    use File::Find;

    print header,
	start_html,
	h1("Perl Environment: $ENV{SERVER_NAME}"),
	p("Perl Version: $]"),
	p("CGI.pm Version: $CGI::VERSION"),
	p("Library Path (\@INC):"),
	ul(li([@INC])),
	p('Modules:');

    foreach my $dir (@INC) {
	my @mods;
	find(sub { push @mods, $File::Find::name if /\.pm$/ }, $dir);
	print ul(li("$dir"), ul(li([sort @mods])));
    }
    __END__
  

As for requiring no modules; you can of course duplicate the functionality
of CGI.pm and Find::File.

-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Sun, 20 Aug 2000 01:24:27 -0500
From: "Dale Emmons" <dale@emmons.dontspamme.com>
Subject: DBI has me stumped... maybe OO problem?
Message-Id: <spuu3jbn87v154@corp.supernews.com>

This problem has stumped me for the last few hours, and I've finally broken
down and decided to ask you guys:

I'm writing a program that outputs a schedule of when people have to work at
an ambulance service. There are 6 types of shifts per day: day emt,
paramedic, trainee, night emt, paramedic, trainee.
The script starts a db connection at the beginning, calls print_calendar() ,
closes the db connection and exits.

print_calendar() loops through all the days of the month and in each loop it
calls get_name_for_time_slot() for each type of shift.
get_name_for_time_slot() looks like this:



#    GET THE NAME FOR A SPECIFIC TIME SLOT
#
#    takes: day, month, year, day_night, type (of slot: emt, paramedic,
trainee)
#    returns: state of that slot and the name of the person taking it.
#    returns undef if slot not taken
#
sub get_name_for_time_slot {

    my $day = shift;
    my $month = shift;
    my $year = shift;
    my $day_night = shift;
    my $type = shift;

    my $Qdate = $dbh->quote($year.'-'.$month.'-'.$day);

    my $Qday_night = $dbh->quote($day_night);
    my $Qtype = $dbh->quote($type);

    # ask the db if the user's id is scheduled for our specific date and
shift

    my ($state, $requester_id) = $dbh->selectrow_array(qq{
        SELECT state, requester_id
        FROM shifts
        WHERE date = $Qdate
            AND day_night = $Qday_night
            AND type = $Qtype
    });

    # if not return undef

    if ( !defined($state) && !defined($requester_id) ) {
        return undef;
    }

    # otherwise find out the user's name and return it and the schedule
state (awaiting, confirmed)

    my $Qrequester_id = $dbh->quote($requester_id);

    my ($requester_first_name, $requester_last_name) =
$dbh->selectrow_array(qq{
        SELECT first_name, last_name
        FROM users
        WHERE id = $Qrequester_id
    });

    # shorten up the first name
    $requester_first_name = tr/^.{1}/$1/;

    return ("$requester_first_name $requester_last_name", $state);

}



The problem that I have is that for the first day of the month the script
will properly return the users that have scheduled that day, but
my ($state, $requester_id) = $dbh->selectrow_array(qq{
returns undef's for any other day, even if the database actually returns
values. The script works if I make a new db connection (thus a new object)
at the beginning of this sub and close it at the end, but I don't want to
have to do that... 180 db connections (6 per day X 30 days) per calander
view 179 too many!

Anyone have any ideas about this? I have a feeling that it's because I'm
doing something wrong with how I'm handling the dbh object, but I'm an OO
novice and have no idea what that might be?

Thanks very much in advance!
-Dale





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

Date: Sun, 20 Aug 2000 01:24:43 -0700
From: "Godzilla!" <callgirl@la.znet.com>
Subject: Re: DBI has me stumped... maybe OO problem?
Message-Id: <399F95CB.A1496C21@la.znet.com>

Dale Emmons wrote:

(snippage) 

> I'm writing a program that outputs a schedule of when people have to 
> work at an ambulance service. There are 6 types of shifts per day: 
> day emt, paramedic, trainee, night emt, paramedic, trainee.


This description of needs is highly inconsistent with reality
and in direct contradiction of standards in practice for 
Emergency Medical Services as set by both state and federal
guidelines, requirements and statues. Your description also
contradicts well followed guidelines set by our national
EMS Foundation. 

You are seventeen and responsible for EMS scheduling?

Godzilla!


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

Date: Sun, 20 Aug 2000 09:50:57 GMT
From: neil@brevity.org (Neil Kandalgaonkar)
Subject: Re: DBI has me stumped... maybe OO problem?
Message-Id: <8no98h$9bc$1@localhost.localdomain>

In article <spuu3jbn87v154@corp.supernews.com>,
Dale Emmons <dale@emmons.dontspamme.com> wrote:
>This problem has stumped me for the last few hours, and I've finally broken
>down and decided to ask you guys:

Would have been easier if you broke it down a bit further. But anyway.

>The script starts a db connection at the beginning, calls print_calendar() ,
>closes the db connection and exits.

It might have been relevant to mention which database.


[ lots of code snipped ]

>    # shorten up the first name
>    $requester_first_name = tr/^.{1}/$1/;
    
tr/// is not what you want. and you used = instead of =~
and you don't understand grouping. This shouldn't work at all.
Get a good book on regexes or see 
http://keck.ucsf.edu/~kvale/perlrequick.pod
 
This task is too simple for regexes anyway.   
   
     $requester_first_name = substr($requester_first_name,0,1);

I dislike this personally, because now $requester_first_name isn't.
Maybe use a new variable called $requester_initial.
 
 
>The problem that I have is that for the first day of the month the script
>will properly return the users that have scheduled that day, but
>my ($state, $requester_id) = $dbh->selectrow_array(qq{
>returns undef's for any other day, even if the database actually returns
>values. The script works if I make a new db connection (thus a new object)
>at the beginning of this sub and close it at the end

Sounds like something went amiss on the database end, since you
don't mention any perl warnings or errors. You are using selectrow(), is it 
possible that more than one row is returned? 

Sometimes waving the dead chicken of $stmt->finish() will fix that
kind of problem, MS Access was once notorious for that. See the DBI
documentation.

Style commentary: why no placeholders? See DBI documentation for details.

-- 
Neil Kandalgaonkar <neil@brevity.org>


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

Date: 20 Aug 2000 02:27:09 GMT
From: "Josiah Bryan" <jdb@wcoil.com>
Subject: Estimating the importance of inputs to an ANN
Message-Id: <8nnflt$qh7$0@206.230.71.43>

Greets all,
    I've created a small routine to test the importance of inputs to an
Artifical Neural Network using the Perl module AI::NeuralNet::BackProp. This
routine handles two types of tests: incrementing one input while holding the
rest at a constant value, and also holding one input at a constant value
while incremnting the rest. The perl routine returns an array of percentages
corresponding to that inputs effect on the output of the network.

You can download this example at:
[
http://josiah.countystart.com/modules/AI/cgi-bin/rec.pl?simp,neural-nets
]

You can also download the Perl module AI::NeuralNet::BackProp which
implements a scalable multi-layer back-prop neural network in Perl from this
url:
[
http://josiah.countystart.com/modules/AI/cgi-bin/rec.pl?mod,neural-nets
]

Note: Be sure to include the entire query string for the urls, or you will
not get the file you are looking for. The query string is everything between
the brackets '[' and ']' for each url.

Let me know if anyone has any ideas on other ways for improving these tests
or other ways of measuring the importance of inputs.

Regards,

~ josiah


--
Josiah Bryan
VP of Product Development
TDCJ, Inc.
"Anything is possible."

vp@tdcj.com
http://www.josiah.countystart.com/

Tel: 937.316.6256


--
--
Josiah Bryan
VP of Product Development
TDCJ, Inc.
"Anything is possible."

vp@tdcj.com
http://www.josiah.countystart.com/

Tel: 937.316.6256





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

Date: Sat, 19 Aug 2000 21:21:52 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: hey, i need help, im trying to get what email = from  www.mydomain.com/cgi-local/test.cgi?email=test@test.com
Message-Id: <399F5CE0.5ED46052@vpservices.com>

mattman055@my-deja.com wrote:
> 
> what i want to do is get test@test.com
> so when a person clicks in an email
> www.mydomain.com/cgi-local/test.cgi?email=teset@test.com

Here is how to do it (you might have to change the first line to reflect
where your web server should expect to find perl, see your web server
docs if you don't know how that line should be written):

#!/usr/local/bin/perl -Tw
$|++;
use strict;
use CGI qw(:standard);
my $email = param('email') || 'No email supplied!';
print header, $email;

(Or do whatever else you want with the value of $email).  See the
doucmentation for CGI.pm for more details.

-- 
Jeff


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

Date: Sun, 20 Aug 2000 04:36:47 -0400
From: MC <mc@backwoods.org>
Subject: Re: hey, i need help, im trying to get what email = from  www.mydomain.com/cgi-local/test.cgi?email=test@test.com
Message-Id: <399F989F.8ADEA5AF@backwoods.org>

better yet, use CGI.pm

-- the proper way --

use CGI;
$mycgi = new CGI;
print $mycgi->param('email');

-- or as I do it --

use CGI;
$mycgi = new CGI;
foreach ($mycgi->param()) { $mycgihash{$_} = $mycgi->param($_) };
print $mycgihash{email};

MC

Brian Delaney wrote:
> 
> have you parsed the form? Use:
> 
> read(STDIN, $input,$ENV{'CONTENT_LENGTH'});
> @pairs = split(/&/, $input);
> foreach $pair (@pairs) {
>         ($name, $value) = split(/=/, $pair);
>         $name =~ tr/+/ /;
>         $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>         $value =~ tr/+/ /;
>         $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>         $IN{$name} = $value;
> }
> 
> the email will be stored in $IN{'email'}
> 
> Brian Delaney,
> http://bdelaney.virtualave.net
> 
> On Sun, 20 Aug 2000 03:46:22 GMT, mattman055@my-deja.com wrote:
> 
> >what i want to do is get test@test.com
> >so when a person clicks in an email
> >www.mydomain.com/cgi-local/test.cgi?email=teset@test.com
> >
> >i am trying all sorts of things to get what email =
> >i am trying $data{'email'}
> >i am trying $values{'email'}
> >i am trying $input{'email'}
> >i am trying $in{'email'}
> >
> >when i do like $xyz = one of those, it always returns nothing, anyhelp
> >would
> >be appreaciated
> >
> >i imagine it is very easy to get the value of a variable from that, but
> >i
> >can't figrue it out
> >
> >thanks matt
> >
> >
> >
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Before you buy.

-- 
---------------------------------------------------------------------
My email address(s) are my private property.  They are NOT to be used
or recorded for ANY reason without my explicit permission.  Disregard
of this statement is in violation of federal privacy & copyright law.
---------------------------------------------------------------------
"The world wont end with a bang, or even a whimper, but with an error
message." -- format C:


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

Date: Sun, 20 Aug 2000 03:46:22 GMT
From: mattman055@my-deja.com
Subject: hey, i need help, im trying to get what email = from www.mydomain.com/cgi-local/test.cgi?email=test@test.com
Message-Id: <8nnkaa$cb1$1@nnrp1.deja.com>

what i want to do is get test@test.com
so when a person clicks in an email
www.mydomain.com/cgi-local/test.cgi?email=teset@test.com

i am trying all sorts of things to get what email =
i am trying $data{'email'}
i am trying $values{'email'}
i am trying $input{'email'}
i am trying $in{'email'}

when i do like $xyz = one of those, it always returns nothing, anyhelp
would
be appreaciated

i imagine it is very easy to get the value of a variable from that, but
i
can't figrue it out

thanks matt





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


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

Date: Sun, 20 Aug 2000 05:02:16 GMT
From: brian@socko.net (Brian Delaney)
Subject: Re: hey, i need help, im trying to get what email = from www.mydomain.com/cgi-local/test.cgi?email=test@test.com
Message-Id: <399f6604.32499227@news.hwcn.org>

have you parsed the form? Use:

read(STDIN, $input,$ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $input);
foreach $pair (@pairs) {
	($name, $value) = split(/=/, $pair);
	$name =~ tr/+/ /;
	$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	$value =~ tr/+/ /;
	$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
	$IN{$name} = $value;
}

the email will be stored in $IN{'email'}

Brian Delaney,
http://bdelaney.virtualave.net

On Sun, 20 Aug 2000 03:46:22 GMT, mattman055@my-deja.com wrote:

>what i want to do is get test@test.com
>so when a person clicks in an email
>www.mydomain.com/cgi-local/test.cgi?email=teset@test.com
>
>i am trying all sorts of things to get what email =
>i am trying $data{'email'}
>i am trying $values{'email'}
>i am trying $input{'email'}
>i am trying $in{'email'}
>
>when i do like $xyz = one of those, it always returns nothing, anyhelp
>would
>be appreaciated
>
>i imagine it is very easy to get the value of a variable from that, but
>i
>can't figrue it out
>
>thanks matt
>
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.



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

Date: Sun, 20 Aug 2000 15:26:46 +0800
From: Yeung Kin <kyeung@acae.cuhk.edu.hk>
Subject: How to know when the client close the browser
Message-Id: <399F8836.B9FF49E5@acae.cuhk.edu.hk>

Hello! Could anyone share the idea with me that I have a page can only
access by one client once time. So after one client logon, others are
forbiddened. My server can be known that the user has been logout when
he/she click on the logout button. But how can I know if the user just
close the browser suddenly?
I mainly handle them in Perl language.
Thanks!

Kin




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

Date: Sun, 20 Aug 2000 07:56:39 GMT
From: "Dave @ kexis" <no@email.for.me>
Subject: Re: How to know when the client close the browser
Message-Id: <XaMn5.187010$8u4.1812385@news1.rdc1.bc.home.com>

This really isn't the right group, as you'll be told numerous times. But it
does prose an interesting question.

"Yeung Kin" <kyeung@acae.cuhk.edu.hk> wrote in message
news:399F8836.B9FF49E5@acae.cuhk.edu.hk...
> Hello! Could anyone share the idea with me that I have a page can only
> access by one client once time. So after one client logon, others are
> forbiddened. My server can be known that the user has been logout when
> he/she click on the logout button. But how can I know if the user just
> close the browser suddenly?
> I mainly handle them in Perl language.
> Thanks!
>
> Kin
>
>




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

Date: Sun, 20 Aug 2000 09:23:37 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: How to know when the client close the browser
Message-Id: <MPG.140a410a3ee4e91d9896d0@localhost>

Yeung Kin <kyeung@acae.cuhk.edu.hk> wrote ..
>Hello! Could anyone share the idea with me that I have a page can only
>access by one client once time. So after one client logon, others are
>forbiddened. My server can be known that the user has been logout when
>he/she click on the logout button. But how can I know if the user just
>close the browser suddenly?

you can't know .. you need to setup a timeout for a login session so 
that after a certain amount of inactivity from a user you allow other 
users to login

-- 
  jason -- elephant@squirrelgroup.com --


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

Date: Sun, 20 Aug 2000 09:39:00 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: How to know when the client close the browser
Message-Id: <slrn8pv9oa.249.marcel@gandalf.local>

On Sun, 20 Aug 2000 15:26:46 +0800, Yeung Kin <kyeung@acae.cuhk.edu.hk>
wrote:

>Hello! Could anyone share the idea with me that I have a page can only
>access by one client once time. So after one client logon, others are
>forbiddened. My server can be known that the user has been logout when
>he/she click on the logout button. But how can I know if the user just
>close the browser suddenly?
>I mainly handle them in Perl language.


So if you wrote Java Servlets, you'd ask in a Java newsgroup?

This doesn't have anything to do with the language you implement your
server-side stuff in, so it's off-topic here.

But I don't know of any way to do what you want. Once the page has been
sent, the connection is closed and that's that. You could maybe have an
onUnload Javascript event handler for your page that tells your server
when the page is unloaded. Which of course doesn't help if the client
doesn't have Javascript enabled. Ask in a Javascript-related newsgroup.


-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Sun, 20 Aug 2000 03:24:43 GMT
From: gerhard_wu@my-deja.com
Subject: How to pass the NTLM authentication of IIS using perl
Message-Id: <8nnj1c$b24$1@nnrp1.deja.com>

Could any one help to solve the problem on passing the NTLM
authentication
without prompt any dialog box by using perl. As I know the perl module
provide 2 kind of authentication mechanism, basic and digest. How do I
us
this to pass the NTLM authentication..

Thanks a lot...


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


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

Date: 19 Aug 2000 12:10:47 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I need help with ffa links script
Message-Id: <8nlpvn$fim$1@orpheus.gellyfish.com>

On Sat, 19 Aug 2000 00:49:39 +0000 (UTC) David Efflandt wrote:
> On Fri, 18 Aug 2000, jeffinnc68@my-deja.com <jeffinnc68@my-deja.com> wrote:
>>
>>I'm hoping someone can help me.  I started a free
>>for all links page and want to allow automatic
>>posting with software (FFAblaster, etc.) but
>>cannot figure out what I have to add to let that
>>happen.  I'm an amateur I admit but no where can
>>i find this info.  Any help would be great if you
>>can.  Email me at jborden@nc.rr.com if you have
>>any suggestions.  Thanks.
> 
> Last time I helped someone with FFA Links, it was not y2k compliant and
> had rather unrefined (bloated) code, including failing to flock files,
> that resulted it all of the links suddenly disappearing.  But that was a
> very busy site that seemed to get continuous hits, probably mostly from
> porno sites using scripts to load up the site with their links using
> wording that was hard to filter out.
> 
> You would probably be better off with something that allows you to review
> links before they are posted.  Then you could weed out any that are
> undesireable or post multiple links with different wording and paths.
> 

Wierdly, I was reminded that I had made an improved version of Matt Wright's
FFA script - I had actually forgotten about it until yesterday, its not
something I am particularly keen to remember I guess.

Anyhow if the OP is interested it can be found at :

   <http://www.perl.gellyfish.com/source/mwffa.pl.txt>

It can be used as a direct replacement for Matt's FFA but doesnt address
any of the problems such as multiple submissions and so on that you mention
but at least its more robust and quite frankly I have better programs to
work on with my time.

/J\
-- 
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: Sat, 19 Aug 2000 20:39:57 -0700
From: "MENZpage.com" <MENZpage@MENZpage.com>
Subject: installation help required ... Window 98 based
Message-Id: <399f53ad$1@newsserver1.intergate.ca>

Hi,

I just can't seem to get my ActivePerl install to work.  I've had it working
in the past (so I'm not a total newbie), however, I must be missing
something this time around.

I have Windows 98 with most current updates, MS Personal Web Server, MS IE5,
and the most current version of ActiveState's ActivePerl.

I am able to test my scripts at the command line with no problems.  The
output is as expected.  However, when I call up a known working script in my
browser, I get a "HTTP 500 - Internal server error" message.  I have already
edited my registry as shown below:

HKEY_LOCAL_MACHINE
System
CurrentControlSet
Services
w3svc
parameters
Script Map
 .pl
c:\perl\bin\perl.exe %s %s

And I have created a virtual directory call "cgi_bin" (different from the
physical directory "cgi-bin") and I've given it "Execute" and "Scripts"
permissions.

From what I know this seems like it should work.  I'm at a loss to know what
to try next.  Any suggestions will be most appreciated.

Sincerely,

Menz




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

Date: Sun, 20 Aug 2000 09:30:49 GMT
From: "Jacob Morrrison" <zikeweb@earthlink.net>
Subject: Localize "require" to subdomain
Message-Id: <dzNn5.3572$Nz4.162641@newsread1.prod.itd.earthlink.net>

Is there a way you can make the variables retrieved with a required file to
only be avalible in the subroutine it was required in? thanks,
Jacob Morrison
http://www.zikeweb.com




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

Date: Sun, 20 Aug 2000 02:14:36 -0500
From: "Dale Emmons" <dale@emmons.dontspamme.com>
Subject: Re: London £30-35K Perl Programmers Required
Message-Id: <spv11kik87v26@corp.supernews.com>


> If you think I'm dreaming about salaries then go on, wake me
> up !!

Well, let's see... 35k pounds is like $20-25 dollars per hour. I don't think
anyone in this newsgroup, except maybe yourself, would even piss for that
little.

Hell... I'm 17, I suck (relative to most people here) at perl, and I can
still get $35-40/hour easily.

>
> Show me a better place to talk to quality Perl programmers than
> in a Perl NewsGroup.

There's a big difference between 'talking' to them and pissing them off.

>
> Keep it coming gents.
>
> Cheers
>
> Chris Barnes
>
> chrisb@hotrecruit.co.uk
>




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

Date: Sat, 19 Aug 2000 23:35:43 -0700
From: James Tolley <jamesht@idt.net>
Subject: Re: Moving CPAN Modules from Windows NT to Linux
Message-Id: <399F7C3F.CD673C11@idt.net>

> I don't expect any problems moving from Windows NT to Linux but I
> would be interested to hear from anybody who has done this before.
> Were there any unexpected problems or complications?

Did you check out "perldoc perlport"? It might give you a few ideas.

hth,

James


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

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


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