[17974] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 134 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 24 19:09:15 2001

Date: Wed, 24 Jan 2001 15:05:24 -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: <980377524-v10-i134@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 24 Jan 2001     Volume: 10 Number: 134

Today's topics:
    Re: [OT] Italic fonts too big <russ_jones@rac.ray.com>
    Re: Adobe Acrobat 4.0 (Abigail)
    Re: Any suggestions on how to improve this  script?     <joe+usenet@sunstarsys.com>
    Re: Any suggestions on how to improve this script? (Sen <psb154@deja-news.com>
        CGI script for ICQ <jeano@my-deja.com>
    Re: CGI script for ICQ <mtaylorlrim@my-deja.com>
    Re: CGI script for ICQ <jeano@my-deja.com>
        child reaper on Dec systems hangs parent <w1tebear@my-deja.com>
    Re: Counting elements in an array (foreach) <me@jp1.co.uk>
    Re: Directory Recursion Problem. <mischief@velma.motion.net>
        Does 'system' function work on Win32 ActivePerl? (Matthias Ferber)
    Re: DOS commands with long directory names <mischief@velma.motion.net>
        exec cgi with parameters problem. Can any of you beauti (Master)
        FileHandle Question? knb50@my-deja.com
        Finding HTTP status code for a URL <g.soper@soundhouse.co.uk>
    Re: Finding HTTP status code for a URL <comdog@panix.com>
    Re: formmail script not printing all fields <mischief@velma.motion.net>
    Re: Free SQL server with perl? <tore@extend.no>
    Re: Free SQL server with perl? (BUCK NAKED1)
        FS Damian Conway OOP Book setgray@my-deja.com
        getting HTTP_referer <paul@indigoproductions.be>
    Re: getting HTTP_referer nobull@mail.com
    Re: hash to java <ducateg@info.bt.co.uk>
        Help with hashes and multilevel databases <mbenson@mediaone.net>
    Re: Help with hashes and multilevel databases (Eric Bohlman)
        How can i delete an item in the middle of an array <telecino@cinoche.com>
        javascript and perl <sdoraira@vt.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 24 Jan 2001 13:01:13 -0600
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: [OT] Italic fonts too big
Message-Id: <3A6F2679.2CCFE4DE@rac.ray.com>

"David H. Adler" wrote:
> 
> 
> dha, wishing there would be a higher mistake to blatant disregard
> ratio...
> 

Good thing you didn't post a job opening, though...


-- 
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747

Cacatne ursus in sylvis? - Ovid


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

Date: 24 Jan 2001 22:39:01 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Adobe Acrobat 4.0
Message-Id: <slrn96umc5.a8v.abigail@tsathoggua.rlyeh.net>

Ben Fuentes (lpfg@yupimail.com) wrote on MMDCCIII September MCMXCIII in
<URL:news:t6tt7qop90q77d@corp.supernews.com>:
__ I have install Win Me and had have problem for Run Adobe Acrobat 4.0
__ because said that have at problems with afill32.api
__ May you help me ?


And your excuse to post here is?



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)))))))))))))))))))))))))


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

Date: 24 Jan 2001 13:00:56 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Any suggestions on how to improve this  script?                                                                           (Sent as a private person)
Message-Id: <m38zo0rfs7.fsf@mumonkan.sunstarsys.com>

Joe Schaefer <joe+usenet@sunstarsys.com> writes:

> > Paul wrote:
> > 
> > > Want to check two text files and determine if a line of 
> > > text appears in the second file but not in the first file.
                                          ^^^
> > >
> > > I also want to do the opposite: Determine if a line of text 
> > > appear in first file but not in the second file..
                               ^^^
> Then you want to compute the _intersection_ of the two files; viewing
> each unique line as an element. See
> 
> % perldoc -q intersect
> 
> for one approach.  Here's one (untested) that might work for files 
> with non-unique lines; it also reads both files into an array which 
> might be undesirable.

I guess I should have read more carefully- you want the *difference*
of two sets, *not* their intersection.  Sorry about that.  Here's
a fix:

> 
> #!/usr/bin/perl -w
> use strict;
> 
> # this takes two array refs and returns list of elements
> # from the second array that appear in the first
                              ^^
                             don't
> 
> sub intersection ($$) {
  ^^^^^^^^^^^^^^^^^^^^
  sub difference ($$) {
> 
>   my %hash;
>   @hash{ @{ $_[0] } } = ();
>   grep {exists $hash{$_}} @{ $_[1] };
         ^^^^^^^^^^^^^^^^^^
       { ! exists $hash{$_} }
> 
> }
> 
> open FILE_A, "</tmp/first_file" or die $!;
> open FILE_B, "</tmp/second_file" or die $!;
> 
> my @result = intersection( [<FILE_A>], [<FILE_B>] );
               ^^^^^^^^^^^^
                difference
> 
> close FILE_A;
> close FILE_B;
> 
> print join "\n", @result;
  ^^^^^^^^^^^^^^^^^^^^^^^^
 print @result; # prints lines in FILE_B that aren't in FILE_A

> __END__
> 
> Note: if FILE_B has multiple lines that match a line in FILE_A,
                      ^^^^^^^^           ^^
                      identical         don't
> they will appear more than once in the output.

That's also fixable by hashing the output lines and returning
the keys instead. Also, you might want to reorder the args in the
"difference" sub, since they're "backwards".  Here's a fix that 
incorporates both changes:

  sub difference ($$) { # computes [@a] - [@b] (viewed as sets)
      my (%in, %out); 
      @in{ @{$_[1]} } = ();
      @out{  grep {! exists $in{$_}} @{$_[0]}  } = ();
      return keys %out;
}

It's another memory hog, but should be pretty quick. 

> HTH

-- 
Joe Schaefer


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

Date: Wed, 24 Jan 2001 16:38:34 +0000
From: Paul <psb154@deja-news.com>
Subject: Re: Any suggestions on how to improve this script? (Sent as a private  person)
Message-Id: <3A6F050A.5221D9EF@deja-news.com>

Thank you all for your replies.

Best regards
--Paul Butterfield.



-- 
This email has been sent: "As a private person."

Care has been taken to avoid sending inappropriate remarks or

attachments via this email.


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

Date: Wed, 24 Jan 2001 20:23:16 GMT
From: jay <jeano@my-deja.com>
Subject: CGI script for ICQ
Message-Id: <94ndj6$oit$1@nnrp1.deja.com>

Here is what I would like to do,

- get a ICQ user ID for my webserver
- use some command-line ICQ client to go online(ICQ) and check the
  online status of my friends
- I would like to call the command line ICQ client via a CGI script
  so that I can then post the online status of all of my friends on
  my website.

I have tried to use CICQ and COMICQ to do this.  Neither one seems to
work.  Is there some text based/command line ICQ client that I can use
for this?  Alternately, is there some perl script somewhere that I can
use for this purpose (namely doing ICQ related stuff).  I have seen the
Net::ICQ pm file but no real examples on how to do what I am looking
for.  Thanks.

-j


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 24 Jan 2001 20:47:12 GMT
From: Mark <mtaylorlrim@my-deja.com>
Subject: Re: CGI script for ICQ
Message-Id: <94nf0d$pt8$1@nnrp1.deja.com>

In article <94ndj6$oit$1@nnrp1.deja.com>,
  jay <jeano@my-deja.com> wrote:
> Here is what I would like to do,
>
> - get a ICQ user ID for my webserver
> - use some command-line ICQ client to go online(ICQ) and check the
>   online status of my friends
> - I would like to call the command line ICQ client via a CGI script
>   so that I can then post the online status of all of my friends on
>   my website.
>
> I have tried to use CICQ and COMICQ to do this.  Neither one seems to
> work.  Is there some text based/command line ICQ client that I can use
> for this?  Alternately, is there some perl script somewhere that I can
> use for this purpose (namely doing ICQ related stuff).  I have seen
the
> Net::ICQ pm file but no real examples on how to do what I am looking
> for.  Thanks.
>
> -j
>
> Sent via Deja.com
> http://www.deja.com/
>
What you want to do is well documented on the ICQ homepage and does not
require any of that. YOu just need to call one of their online status
images... like...

<img src="http://wwp.icq.com/scripts/online.dll?icq=99999999&img=4">

where 99999999 is the icq number of one of your friends.. There are
several different images you could display to indicate the status of
your friends...this is just image #4

Look in the ICQ Tools catalog (Indicators) for a complete list.
http://www.icq.com/features/web/indicator.html


Mark


--
Please reply to this newsgroup as my Deja mail
is used as a spam catcher only!


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 24 Jan 2001 22:39:38 GMT
From: jay <jeano@my-deja.com>
Subject: Re: CGI script for ICQ
Message-Id: <94nlj9$iv$1@nnrp1.deja.com>

Mark,

I thought of doing it this way, but I really didnt want the user to have
to set their "Web Aware" settings.  I also wanted my friends to
be able to set their ICQ status to "invisible to user" to the servers,
ICQ number.

> >
> > Sent via Deja.com
> > http://www.deja.com/
> >
> What you want to do is well documented on the ICQ homepage and does
not
> require any of that. YOu just need to call one of their online status
> images... like...
>
> <img src="http://wwp.icq.com/scripts/online.dll?icq=99999999&img=4">
>
> where 99999999 is the icq number of one of your friends.. There are
> several different images you could display to indicate the status of
> your friends...this is just image #4
>
> Look in the ICQ Tools catalog (Indicators) for a complete list.
> http://www.icq.com/features/web/indicator.html
>
> Mark
>


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 24 Jan 2001 18:17:13 GMT
From: w1tebear <w1tebear@my-deja.com>
Subject: child reaper on Dec systems hangs parent
Message-Id: <94n66v$h3o$1@nnrp1.deja.com>

I have a long running process that creates many child processes
(basically,
the program services a socket and forks a child to process each request
it gets on the socket).  I have been able to write successful SIGCHLD
signal handlers for this program for Sun and Irix servers, but cannot
get
a working solution on DEC.

I have attempted all of the following (as you will see, my trials
include
the perlipc suggestions, and nothing yet seems to work.

In the following examples, I have debug print statements, which I know
are
not supposed to be in signal handlers.  The test results are the same
with
or without the prints.

Has anyone out there been successful avoiding zombies on DEC
system?...and
if so, can you please help me out here?

What I've tried:
------------------------------------------------------------------------------
From perlipc:

sub decReaper
{
    my $pid;
    $SIG{CHLD} = \&decReaper;
    while ($pid = waitpid(-1, WNOHANG)) {
        TTI::debugMsg(4,
        "exec_server in decReaper after waitpid - got <$pid> - status:
$?");
    }
}

Causes endless looping with $pid returned from waitpid(-1, WNOHANG) = -1
------------------------------------------------------------------------------
Having read the waitpid/sigaction man pages on dec, I noted the
following
on returns from waitpid:

0 = this proc has children, but they are still running
-1 = this proc has no children

So I tried:

sub decReaper
{
    my $pid;
    $SIG{CHLD} = \&decReaper;
    while (($pid = waitpid(-1, WNOHANG)) > 0) {
        TTI::debugMsg(4,
        "exec_server in decReaper after waitpid - got <$pid> - status:
$?");
    }
    TTI::debugMsg(4,
    "exec_server in decReaper exiting - got <$pid> - status: $?");
}

This causes my parent process to hang.
At the point where it is hanging, there are
always 2 zombie processes.  All of the "decReaper exiting" messages but
the
last 2 indicate a pid = -1, status = -1.  The last 2 indicate pid = 0,
status = 1;

Sending a "kill -CHLD" to the parent pid has no effect.
------------------------------------------------------------------------------
Setting $SIG{'CHLD'} = 'IGNORE' generates 100s of defunct processes -
eventually
causing the system to run out of resources.
------------------------------------------------------------------------------
sub decReaper
{
    my $pid = wait;
}

This causes zombies as well, though not as quickly.  Because the program
runs for long periods, this also causes the system to run out of
resources,
eventually.
------------------------------------------------------------------------------


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 24 Jan 2001 18:59:59 -0000
From: "Jerry Pank" <me@jp1.co.uk>
Subject: Re: Counting elements in an array (foreach)
Message-Id: <94n8n5$18m$1@plutonium.btinternet.com>


Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote in message
news:slrn96nsgl.2q0.bernard.el-hagin@gdndev25.lido-tech...
> On Mon, 22 Jan 2001 05:56:24 -0000, Jerry Pank <me@jp1.co.uk> wrote:
> >
> >Thanks for your time on this Jim.  Maybe I should have given a better
> >example (without numbers in the array) eg:
> >
> >my @words = qw(fizz buzz foo bar flurp frap);
> >my $i=0;
> >foreach my $word (@words) {
> >   print "3rd Word is $word\n" if $i == 2;
> >   $i++;
> >}
> >
> >My point is that I expected perl to have a `special' variable that I
could
> >use without having to resort to $i every time.
>
> Either you've chosen the wrong subject for your post (since you don't
> need to actually count elements in an array), you've chosen the wrong
> example to illustrate your question (since looping through an entire
> array just to print its third element is indubitably dubious) or you
> want to know whether there's an internal counter which you could access
> to find out which element of an array a loop is currently on. So which
> is it?

Doh. Number three please!

[apologies if this is a duplicate post, my newsfeed *appears* not to have
sent my last reply]

--
j
Jerry Pank <me@jp1.co.uk>





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

Date: Wed, 24 Jan 2001 18:00:26 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Directory Recursion Problem.
Message-Id: <t6u61q6e24une5@corp.supernews.com>

Craig Berry <cberry@cinenet.net> wrote:
> Martien Verbruggen (mgjv@tradingpost.com.au) wrote:
> : I wonder if we could get MS OUtlook made illegal in sensible countries
> : that already ban guns.

> I'd suggest imposing a mandatory waiting period, but Windows boot already
> covers that. :)

I suggest mandatory waiting periods for lots of things:

    one week for anything from Microsoft with the exception
    of mice and joysticks

    one month reading a newsgroup before posting

    one month using a computer language before posting to a
    group about that language

    an additional two to five months using a language before
    removing the disclaimer "I am a <language name> newbie" from
    the body of the post

    two weeks to buy a rifle or shotgun

    two months waiting period, registration, psych evaluation,
    and a background check before buying a handgun

    one month after receiving one's first driver's license before
    being able to register a car in one's own name

Besides the above, I'd suggest that one need to show identification
representing soundness of mind before buying more than a limited amount
of firearms ammunition, flammable fluids, explosives, or poisonous
substances.

:) Please take most of this a bit unseriously, but only a bit. In
case anyone wonders, I really am one of the few people who are
for gun ownership but for some regulation as well.

Chris

-- 
Christopher E. Stith

Try not. Do, or do not. The Force is binary. -- Yoda,
The Empire Strikes Back (paraphrased)



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

Date: Wed, 24 Jan 2001 21:24:20 GMT
From: matthias.ferber@bwise.com (Matthias Ferber)
Subject: Does 'system' function work on Win32 ActivePerl?
Message-Id: <3a6f4681.6625987@news.dnai.com>

First of all, sincere apologies if this is a FAQ.  I haven't found the
answer anywhere.

I'm trying to write a simple controller script under Windows 98 using
Perl.  It uses the 'system' call to invoke another program on a series
of files in a directory, one at a time.  The problem is that the
system call doesn't seem to be doing anything -- I get no output, even
if I use backticks instead.  I'm at a loss.

I've seen elsewhere in this newsgroup that fork() may not be well
implemented on Win32, which wouldn't exactly shock me.  I'm wondering
if system() is also flaky.  Anybody know or have any suggestions?

Wriggling with anticipation,
Matthias Ferber
matthias_ferber@yahoo.com


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

Date: Wed, 24 Jan 2001 18:11:55 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: DOS commands with long directory names
Message-Id: <t6u6nb4lmv0ke2@corp.supernews.com>

Villy Kruse <vek@pharmnl.ohout.pharmapartners.nl> wrote:
> On Mon, 22 Jan 2001 18:28:42 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:
>>lbieg@my-deja.com wrote:

> BTW, DOS can accept slashes in pathnames either way, but COMMAND.COM
> does not.  Thus for system() you do need backslashes between path name
> components.  That is, of course, if system() calls the external program
> using COMMAND.COM instead of directly.  Even so, many DOS programs don't
> like pathnames with forward slashes either.

Even more clarification:

DOS can accept forward slashes in a batch file, too. The following
should work on your Windows system, or at least it does on my Win2k
Professional at my desk at work:

       @if exist c:/windows/win.com echo It worked!

-- 
Christopher E. Stith

Even in the worst of times, there is always someone who's
never had it better. Even in the best of times, there is
always someone who's never had it worse.



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

Date: Wed, 24 Jan 2001 22:07:25 GMT
From: webmaster@homecinemachoice.zerospam.com (Master)
Subject: exec cgi with parameters problem. Can any of you beautiful people help?
Message-Id: <3a6f4f41.47589361@news.btclick.com>

I have several websites on a dedicated server and they share the
Ultimate Bulletin Board in one of the domains.
What I want to do is insert one of the forum pages into a page of one
of the other domains.
Obviously I can't #include virtual since the page being included is on
the same server but in a different domain.
The only apparent solution is to run a cgi script to display the
document :

In the source page :
<!--#exec cgi="/cgi-bin/review_comments.pl?page=000067.html" -->

and the perl program being
----------------------------------------------------------------------------------------------------
#!/usr/bin/perl

if ($ENV{'REQUEST_METHOD'} eq 'GET') {
   # Split the name-value pairs
   @pairs = split(/&/, $ENV{'QUERY_STRING'});
}
elsif ($ENV{'REQUEST_METHOD'} eq 'POST') {
   # Get the input
   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

   # Split the name-value pairs
   @pairs = split(/&/, $buffer);
}
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;
   $value =~ s/<!--(.|\n)*-->//g;
   if ($name eq 'page') {$page = $value};
}
print "Content-Type: text/html\n\n";
$htmlfile = "/home/sites/site2/web/ubb/Forum5/HTML/$page";
open(DB, $htmlfile);
  while(<DB>){
    print $_;
  } # End of while.
close (DB);
----------------------------------------------------------------------------------------------------
This script works perfectly when it is run by typing it's address into
a browser.
But the exec cgi won't work with that parameter. The page name HAS to
be sent over as there are over 500 pages to be included.

Maybe this one is more suited to a SSI newsgroup, but there aren't
any.
So has anyone conquered this problem ?
Thanks


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

Date: Wed, 24 Jan 2001 21:53:56 GMT
From: knb50@my-deja.com
Subject: FileHandle Question?
Message-Id: <94nitd$u02$1@nnrp1.deja.com>

Hi, all.  Just have a quick question about FileHandles in Perl.  I am
quite confused.  I have five file which I need to run the same program
over.  I was just going to open(FILE, "<$file"), in the for loop  and
change out $file each time with the new filename, but I only get every
other file to open up.

----------------------
my @array=("*.f1","*.f2","*.f3","*.f4","*.f5);

for($i=0; $i<5; $i++){
     $file=$array[$i];
     open (FILE,"<$file")||die...

     do the program stuff here...

     close(FILE);
}

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

Is this completely illegal?--to use the same FileHandle for different
files? or am I completely
insane at this point?

Thanks,
Kim


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 24 Jan 2001 18:36:08 +0000 (GMT)
From: Geoff Soper <g.soper@soundhouse.co.uk>
Subject: Finding HTTP status code for a URL
Message-Id: <4a4202258cg.soper@soundhouse.co.uk>

I would like to be able to find the HTTP status code for a URL for a
script I plan to run on a web server. Is there a module that would let me
do this? I've looked in the docs and on CPAN but can't see one that
suggest this.

Thanks

-- 
Geoff Soper
g.soper@soundhouse.co.uk
Take a look at the Soundhouse page http://www.soundhouse.co.uk/


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

Date: Wed, 24 Jan 2001 14:07:20 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Finding HTTP status code for a URL
Message-Id: <comdog-A84377.14072024012001@news.panix.com>

In article <4a4202258cg.soper@soundhouse.co.uk>, Geoff Soper 
<g.soper@soundhouse.co.uk> wrote:

> I would like to be able to find the HTTP status code for a URL for a
> script I plan to run on a web server. Is there a module that would let me
> do this? I've looked in the docs and on CPAN but can't see one that
> suggest this.

HTTP::SimpleLinkChecker doesn't do what you want?

http://search.cpan.org/search?mode=module&query=HTTP%3A%3ASimple

-- 
brian d foy <comdog@panix.com>
no longer for hire ;)


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

Date: Wed, 24 Jan 2001 20:37:31 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: formmail script not printing all fields
Message-Id: <t6uf8bsh84m19b@corp.supernews.com>

Doral Vance Hackett <vanced@ohsu.edu> wrote:
> We recently updated our generic formmail script to Matt Wright's
> FormMail.pl for processing web forms. Our old script was allowing
> outside users to use our script for spamming purposes so we had to do
> something quick.

Better to fix your other one for spam control, to hire someone to
write a form-to-email script, or to find a better free solution.
Matt Wright is infamous for his poor code.

> One user noticed that this new script wasn't printing out all the
> fields. After confirming that the "print_blank_fields" line was in
> place, I couldn't see another reason for this. In fact, it's not just
> blank fields that are being left out, but some that have data as well.
> I'm new to Perl so I thought I'd ask here to see if anyone else had come
> upon this problem before.

Anything from Matt's Script Archive is a problem in itself. There
are better options.

Chris

-- 
Christopher E. Stith

Even in the worst of times, there is always someone who's
never had it better. Even in the best of times, there is
always someone who's never had it worse.



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

Date: Wed, 24 Jan 2001 19:30:35 +0100
From: Tore Aursand <tore@extend.no>
Subject: Re: Free SQL server with perl?
Message-Id: <MPG.14d93db36675330398985b@news.online.no>

In article <lb8zo1xcua.fsf@lnc.usc.edu>, brannon@lnc.usc.edu says...
> Does mysql support transactions?

"MySQL supports two different kinds of tables. Transaction-safe
 tables (BDB) and not transaction-safe tables (ISAM, MERGE, MyISAM,
 and HEAP)."

<URL:http://www.mysql.com/doc/T/a/Table_types.html>


-- 
Tore Aursand - tore@extend.no - http://www.extend.no/~tore/


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

Date: Wed, 24 Jan 2001 12:27:58 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: Free SQL server with perl?
Message-Id: <10059-3A6F1EAE-34@storefull-245.iap.bryant.webtv.net>

Here's one...

http://hosting.datablocks.net/free/

HTH,
Dennis,
JAPJO (just another perl jackoff) :->



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

Date: Wed, 24 Jan 2001 21:51:55 GMT
From: setgray@my-deja.com
Subject: FS Damian Conway OOP Book
Message-Id: <94nipm$ttq$1@nnrp1.deja.com>

This is a great book to read if you're looking for something new in
perl - it's the latest take on OOP. It's also the BEST book on object-
oriented programming, regardless of language. Check it out.

New, latest edition, unused (the class was canceled).

Opbeject-Oriented Perl, by Damian Conway.
http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=1209753393

Thanks


Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 24 Jan 2001 16:31:42 GMT
From: Paul Goris <paul@indigoproductions.be>
Subject: getting HTTP_referer
Message-Id: <B694C1FE.8E91%paul@indigoproductions.be>

Hi,

As I'm not an expert, please bear with me if I'm asking for the obvious ;-)

I have a problem getting the HTTP_REFERER data into my script.

I think i should be able to get this with $ENV{HTTP_REFERER} or, to have it
printed, something like:

print "HTTP_referer is : $ENV{HTTP_REFERER}";

Only this produces no results.

The strange thing is, I have no trouble getting a list of and printing all
other Env. variables, only the HTTP_REFERER is lacking every time.

We have Perl installed and running on Windows NT with IIS 4.0.

Has our Windows environment something to do with this?

Thanks for any help.

Paul Goris




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

Date: 24 Jan 2001 18:48:08 +0000
From: nobull@mail.com
Subject: Re: getting HTTP_referer
Message-Id: <u9zogghjmf.fsf@wcl-l.bham.ac.uk>

Paul Goris <paul@indigoproductions.be> writes:

> As I'm not an expert, please bear with me if I'm asking for the obvious ;-)
> 
> I have a problem getting the HTTP_REFERER data into my script.

Are you sure there's any refererer header in the requests?
 
> I think i should be able to get this with $ENV{HTTP_REFERER} or, to have it
> printed, something like:
> 
> print "HTTP_referer is : $ENV{HTTP_REFERER}";
> 
> Only this produces no results.
> 
> The strange thing is, I have no trouble getting a list of and printing all
> other Env. variables, only the HTTP_REFERER is lacking every time.
> 
> We have Perl installed and running on Windows NT with IIS 4.0.
> 
> Has our Windows environment something to do with this?

Probably.  You seem to have proved beyond reasonable doubt that this
is nothing to do with Perl.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Wed, 24 Jan 2001 16:26:39 -0000
From: "Géry" <ducateg@info.bt.co.uk>
Subject: Re: hash to java
Message-Id: <94mvt2$pgs$1@pheidippides.axion.bt.co.uk>

Sorry, it is true I left out a bit of information. I want to stream the hash
from a perl script to populate a hash table in a java piece of code. I do
not want to use an intermediate file...

Can I simply pass the object reference and expect that the perl hash
structure will turn into a valid java hash table, or do I need to populate
the java hash table passing some string values from a perl sub function? I
guess I wand to pipe the data, but then how do I go about doing it?

So if I end a perl script with:

return %myhash;

how do I get it back into a java piece of code...

Of course, I am simply looking for guidelines, not complete solutions...

"Géry" <ducateg@info.bt.co.uk> wrote in message
news:94mq5r$n3r$1@pheidippides.axion.bt.co.uk...
> How do I pass a hash to a java piece of code in order to obtain a lovely
> hash table?
>
> Many thanks in advance...
> --
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Géry
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
>




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

Date: Wed, 24 Jan 2001 18:15:37 GMT
From: Michael Benson <mbenson@mediaone.net>
Subject: Help with hashes and multilevel databases
Message-Id: <3A6F1B3E.5816D9E7@mediaone.net>

Hello everyone, i am trying to store a multilevel database to disk and
just cant seem to get it to work. I would really apreciate any help that
you can offer as to why the below code isn't working.

                        Thank you,

                             Michael Benson

CODE:

#! /usr/local/bin/perl -w
use Strict;
use MLDBM qw(DB_File Storable);
use Fcntl;

my %s = ();
tie (%s, "MLDBM", "test", O_CREAT|O_RDWR, 0666, $DB_File::DB_BTREE)
 || die "Could not open or create database.";

$s{b}[0] = "this is a line.";
$s{b}[1] = "this is a second line.";

# nothing is printed thus i am left to assume that the above lines
aren't working #(storing their values to the hash.)
print $s{b}[0];


untie(%s);
exit(0);




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

Date: 24 Jan 2001 21:20:40 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Help with hashes and multilevel databases
Message-Id: <94ngv8$kcl$2@bob.news.rcn.net>

Michael Benson <mbenson@mediaone.net> wrote:
> Hello everyone, i am trying to store a multilevel database to disk and
> just cant seem to get it to work. I would really apreciate any help that
> you can offer as to why the below code isn't working.

>                         Thank you,

>                              Michael Benson

> CODE:

> #! /usr/local/bin/perl -w
> use Strict;
> use MLDBM qw(DB_File Storable);
> use Fcntl;

> my %s = ();
> tie (%s, "MLDBM", "test", O_CREAT|O_RDWR, 0666, $DB_File::DB_BTREE)
>  || die "Could not open or create database.";

> $s{b}[0] = "this is a line.";
> $s{b}[1] = "this is a second line.";

> # nothing is printed thus i am left to assume that the above lines
> aren't working #(storing their values to the hash.)
> print $s{b}[0];


> untie(%s);
> exit(0);

Take a closer look at MLDBM's documentation, paying close attention to the 
cautions about trying to change tied values in-place.




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

Date: Wed, 24 Jan 2001 23:04:45 GMT
From: telecino <telecino@cinoche.com>
Subject: How can i delete an item in the middle of an array
Message-Id: <B694CA23.C21%telecino@cinoche.com>

I have an array that is randomly composed each time some function is called.
It contains many elements, each time in a different order, and it contains
an item called "X" that i don't want there. I want to delet it from the
array, but i don't know it's position, so i can't use splice.

How can it be done,


Thanks in advance.



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

Date: Wed, 24 Jan 2001 22:13:54 GMT
From: Sundar <sdoraira@vt.edu>
Subject: javascript and perl
Message-Id: <94nk2m$v7g$1@nnrp1.deja.com>

Hi,
Here's my problem.

I have a page that I write some input fields using javascript:

<form method='POST' action='finish.cgi'>
<script language='JavaScript'>
<!--
document.write("<input type='hidden' name='id' value='"+id+"'>\n");
document.write("<input type='hidden' name='time' value='"+time+"'>\n");
// -->
</script>
<input type='hidden' name='redirect' value='http://redirect.com'>
<input type='submit' value='Take Quiz'>
</form>

When I submit this my cgi script doesn't read the inputs written by
javascript. Here's the CGI code.

sub write_form_info {
  open (FORM, ">>$form_info_path") || die ("Error opening file.");
  print FORM "$ENV{'REMOTE_HOST'}\t";
  print FORM "$input{'id'}\t";
  print FORM "$input{'time'}\n";
  close (FORM);
}

# Send them to the proper URL
print "Location: $input{'redirect'}\n\n";

Whe this is compiled, the archive file where the data is being written
only records the REMOTE_HOST and not the rest. Could someone help me on
this?

Thanks.

--
Sundar Dorai-Raj
Department of Statistics
Virginia Tech
http://www.stat.vt.edu/~sundar/
sdoraira@vt.edu


Sent via Deja.com
http://www.deja.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 V10 Issue 134
**************************************


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