[15751] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3164 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 25 18:05:52 2000

Date: Thu, 25 May 2000 15:05:27 -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: <959292326-v9-i3164@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 25 May 2000     Volume: 9 Number: 3164

Today's topics:
    Re: &#037; translating ascii to unicode? (Philip 'Yes, that's my address' Newton)
    Re: &#037; translating ascii to unicode? <flavell@mail.cern.ch>
        ([^|]+) vs (.*?)  <chantal@excite.nl>
    Re: ([^|]+) vs (.*?) (Abigail)
        [ANNOUNCE] corrected version 0.072 of DBD::RAM <jeff@vpservices.com>
        Accessing Large (Plus 2 gigs) scgilbert@my-deja.com
    Re: Accessing Large (Plus 2 gigs) <bert@scanlaser.nl>
    Re: Accessing Large (Plus 2 gigs) <glauber.ribeiroNOglSPAM@experian.com.invalid>
    Re: alias mail and script perl <rootbeer@redcat.com>
    Re: array within array revisited <lr@hpl.hp.com>
    Re: Can't Knit Two Files Together (Bart Lateur)
        cgi error (database)` vikas_jain@planetall.com
    Re: cgi error (database)` <makarand_kulkarni@My-Deja.com>
    Re: cgi error (database)` <makarand_kulkarni@My-Deja.com>
    Re: cgi error (database)` <rootbeer@redcat.com>
    Re: cgi name-value pairs , special characters <hyagillot@tesco.net>
    Re: Copy A File? (David H. Adler)
    Re: Finding IP addresses+ <andrew.mcguire@walgreens.com>
    Re: Forum for 'how to do it' questions? <rootbeer@redcat.com>
        frustrating redirect() problem on Win2k <andrew@mahler.com>
    Re: frustrating redirect() problem on Win2k (Clinton A. Pierce)
        GDBM_File <skpurcell@hotmail.com>
    Re: Getting HTML source <iltzu@sci.invalid>
    Re: Gloval variable <aqumsieh@hyperchip.com>
        HELP????? <nisi@nospam_yahoo.com>
        how to /s '[item]' <malkav@strato.net>
    Re: how to /s '[item]' <makarand_kulkarni@My-Deja.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 25 May 2000 18:41:46 GMT
From: nospam.newton@gmx.li (Philip 'Yes, that's my address' Newton)
Subject: Re: &#037; translating ascii to unicode?
Message-Id: <392d6e24.132924406@news.nikoma.de>

On Wed, 24 May 2000 14:19:41 +0200, "Alan J. Flavell"
<flavell@mail.cern.ch> wrote:

> There are at least three character _codes_ that include the Latin-1
> character _repertoire_, in addition to the standard code iso-8859-1:
> there's DOS CP-850, there's Windows-1252, and there's EBCDIC CECP-1047

I believe DOS CP-819 is supposed to contain the same repertoire as
ISO-8859-1, and with the same code positions. Don't know whether it's
used extensively, though.

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


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

Date: Thu, 25 May 2000 21:56:33 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: &#037; translating ascii to unicode?
Message-Id: <Pine.GHP.4.21.0005252131190.10338-100000@hpplus01.cern.ch>

On Thu, 25 May 2000, Philip 'Yes, that's my address' Newton wrote:

> I believe DOS CP-819 is supposed to contain the same repertoire as
> ISO-8859-1, and with the same code positions.

Quite right (that's what comes from composing on the hoof - I might as
well have pointed people to my web pages, where this has been covered
for some years already ;-)

> Don't know whether it's used extensively, though.

As a DOS code page?  - by my observations, no, it isn't at all common,
though it does have some fans.  In practice, I think, people would
want to stay with cp-850 (DOS-based applications such as Lynx or
PC-PINE 3.xx know how to map between iso-8859-1 on the 'net and cp-850
for the display), or abandon DOS-native applications entirely.

Win32 console applications (e.g PC-PINE 4.xx) use Windoze coding
(windows-1252 in a Latin-1 locale) anyway.

(Hmmm: when I ask Google to search on cp819, it picks up my own
venerable web page on the subject as number 1, whereas the
official IANA document comes well down the second results page!!)

-- 

     > Glaubt mir, HTML ist so tot....)
     Kann gar nicht sein - erst gestern habe ich noch eins gesehen ;-)
                          - seen in de.comm.infosystems.www.authoring.misc



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

Date: Thu, 25 May 2000 22:12:07 +0200
From: "Chantal" <chantal@excite.nl>
Subject: ([^|]+) vs (.*?) 
Message-Id: <392d8a49$0$6075@reader4.casema.net>

Hi all.

i know its not the same but i don't know the difference.
who can tell me
([^|]+)  and  (.*?)
(the pipe is part of the string)

Regards, Chantal




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

Date: 25 May 2000 20:32:36 GMT
From: abigail@arena-i.com (Abigail)
Subject: Re: ([^|]+) vs (.*?)
Message-Id: <8gk2l4$5kn$1@news.panix.com>

On Thu, 25 May 2000 22:12:07 +0200, Chantal <chantal@excite.nl> wrote:
++ Hi all.
++ 
++ i know its not the same but i don't know the difference.
++ who can tell me
++ ([^|]+)  and  (.*?)
++ (the pipe is part of the string)

Well, they are very different:

    ([^|]+):   matches a longest possible (sub)string, of at least one
               character, that doesn't contain a '|'.
    (.*?):     matches a shortest possible (sub)string, possibly empty,
               that doesn't contain a newline (unless /s is in effect).



Abigail


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

Date: Thu, 25 May 2000 12:27:05 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: [ANNOUNCE] corrected version 0.072 of DBD::RAM
Message-Id: <1ZfX4.59748$g41.2522689@news-west.usenetserver.com>


Apologies to anyone who may have already downloaded this module today. 
There were two minor bugs in it.  If you are going to be using the USR
data type or if you have problems accessing the POD documentation,
please download the revised 0.072 version.  It has been uploaded to CPAN
and is also available now at:

    http://www.vpservices.com/jeff/programs/dbd-ram.html

Changes are:

Version 0.072, 25th May, 2000

 * Fixed bug in interpreting eol for USR data type

 * Fixed problems in POD (bad head3, wrong USR info)


-- 
Jeff






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

Date: Thu, 25 May 2000 19:44:32 GMT
From: scgilbert@my-deja.com
Subject: Accessing Large (Plus 2 gigs)
Message-Id: <8gjvqr$ohu$1@nnrp1.deja.com>

I'm having problems with some perl scripts that have been working for
awhile. When these tried and true scripts are run against files that
exceed 2 gigs I get an error message:"Can't open 'bigfile': Value too
large to be stored in data type at recs line 12." This message is not a
perl message.

Some background: Running an HP K460 4 cpu, under HPUX 10.20, 140 gig
disk space, 1 gig mem. The HPUX LARGEFILES setting is set. I have also
tested this under HPUX 11.0.

I really need to resolve this as we will be handling much larger files
soon.

Here is a sample script that's worked fine since December 99':

#!/opt/perl5/bin/perl -w

# recs calculates the number of records in a fixed length ascii file

# Usage: recs filename [length]

# Created 12/22/99 SG
# Updated 12/27/99 SG recs now excepts a second parameter for length
# if a length is specified that value will be used to calculate records
# if no length is specified then it is calculated from the first record

open(FILE, "<$ARGV[0]") or die "Can't open '$ARGV[0]': $!";
$bytes=(-s FILE);
$line=<FILE>;
$reclen=length($line);
if ($ARGV[1] != "") {
    $reclen=$ARGV[1]
}
print $bytes/$reclen,"\n";
close FILE;


If anyone has some ideas it would be greatly appriciated!
Thanks in advance!

Steve


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


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

Date: Thu, 25 May 2000 23:25:32 +0200
From: Bert IJff <bert@scanlaser.nl>
To: scgilbert@my-deja.com
Subject: Re: Accessing Large (Plus 2 gigs)
Message-Id: <392D9A4C.269A75B0@scanlaser.nl>



scgilbert@my-deja.com wrote:
> 
> I'm having problems with some perl scripts that have been working for
> awhile. When these tried and true scripts are run against files that
> exceed 2 gigs I get an error message:"Can't open 'bigfile': Value too
> large to be stored in data type at recs line 12." This message is not a
> perl message.
> 
> Some background: Running an HP K460 4 cpu, under HPUX 10.20, 140 gig
> disk space, 1 gig mem. The HPUX LARGEFILES setting is set. I have also
> tested this under HPUX 11.0.
> 
> I really need to resolve this as we will be handling much larger files
> soon.
> 

Seems to be a signed/unsigned problem to me.
If perl has been built on your system you might be able to figure out
where the message comes from.
On my system (running HPUX 11.0) I couldn't find a message like
yours;-(

2 gig = 2^31
between 2 and 4 gigs you need an unsigned 32 bit integer to represent
that fact.
If the datatype mentioned in the errormessage is a 32 bit signed
integer, you would
get a negative size ;-)
May be possible to upgrade to 64 bits longs?
Maybe stat gives the correct filesize? (or does -s FILE get it's value
from stat in the first place?
I don't know)

hth
Bert


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

Date: Thu, 25 May 2000 14:49:15 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: Accessing Large (Plus 2 gigs)
Message-Id: <07d64b7c.d0d405cc@usw-ex0103-019.remarq.com>

You need to build Perl so it can handle large files (the way to
do this varies from system to system).

Sometimes, using redirection works. For example, instead of
opening the file in Perl, read from stdin and do
perl program.pl <bigfile


good luck!

glauber

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



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

Date: Thu, 25 May 2000 12:04:49 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: alias mail and script perl
Message-Id: <Pine.GSO.4.10.10005251204080.14618-100000@user2.teleport.com>

On Thu, 25 May 2000 ghorghor@my-deja.com wrote:

> the script juste create or write a file like tutu.txt
> the script and the file and chmod 777

Mode 777 is pretty-much certain to have far too many one-bits for
security. Use something more restrictive. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 25 May 2000 13:56:11 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: array within array revisited
Message-Id: <MPG.13973344cb460fb998aadf@nntp.hpl.hp.com>

In article <8gjpb8$jbp$1@nnrp1.deja.com> on Thu, 25 May 2000 17:53:51 
GMT, j555@my-deja.com <j555@my-deja.com> says...

 ...
 
> How do I extract an array out of a reference to an array?
> I went to the Perl docs but I still find it confusing. Unfortunately
> I'm in a hurry and don't have time to read all the details.
> I've had to implement a kludge in the meantime.
> But the new question is, if I have this:
> 
> @foo[100] = (1,2,3,4);
> or better yet...
> $faa{"blah"} = (1,2,3,4);

You need to learn the syntax of array accesses and the distinction 
between a list and an array.  Those are written properly thus:

  $foo[100]  = [ 1, 2, 3, 4 ];

  $faa{blah} = [ 1, 2, 3, 4 ];

Note the square brackets to create an anonymous array.  Your attempts 
would have simply stored the last value in the sequence, 4.
 
> How do I store the subarray back into another array so that I can
> say
> 
> print @fee[3];
> 
> and have the number 4 printed?

You don't have to store the subarray back into another array.

  $foo[100]->[3]

  $foo[100][3]

  $foo{blah}->[3]

  $foo{blah}[3]

But if you insist on copying it out,

  my @copy = @{$foo[100]};

  my @copy = @{$foo{blah}}

Get thee to perlref and perldsc and perllol ASAP!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 25 May 2000 19:02:33 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Can't Knit Two Files Together
Message-Id: <392e7872.28876214@news.skynet.be>

Larry Rosler wrote:

>Relative to my discussion with Godzilla!, note the unnecessary chomp(), 
>repaired by the 'Lateur Idiom' on $\.

:-)

Wait till it turns out that it's the last field that needs translating.
Then, the chomp() won't be that unnecessary.

-- 
	Bart.


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

Date: Thu, 25 May 2000 21:26:09 GMT
From: vikas_jain@planetall.com
Subject: cgi error (database)`
Message-Id: <8gk5p0$t30$1@nnrp1.deja.com>

Hi,

I had written a small perl script to connect to Sybase database using
DBI calls.
I am getting the following error (logged in the error_log file of web
server), but the same script run without any problems on command prompt.
I would appreciate if someone can throw some light on it.

install_driver(Sybase) failed: Can't load
'/apps/perl/lib/site_perl/sun4-solaris/auto/DBD/Sybase/Sybase.so' for
module DBD::Sybase: ld.so.1: /apps/perl/bin/perl: fatal: libct.so: open
failed: No such file or directory at
/apps/perl/lib/sun4-solaris/5.00404/DynaLoader.pm line 166.

 at (eval 22) line 2

    DBI::install_driver('DBI', 'Sybase') called at
/apps/perl/lib/site_perl/DBI.pm line 348
    DBI::connect('DBI', 'MIGRATE11', 'refdb', 'baseball10', 'Sybase')
called at /home/vijain/apache_1.3.9/cgi-bin/test line 30

Vikas Jain


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


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

Date: Thu, 25 May 2000 14:46:29 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: cgi error (database)`
Message-Id: <392D9F35.2E213940@My-Deja.com>

> I had written a small perl script to connect to Sybase database using
> DBI calls.
> I am getting the following error (logged in the error_log file of web
> server), but the same script run without any problems on command prompt.
> I would appreciate if someone can throw some light on it.
>
> install_driver(Sybase) failed: Can't load
> '/apps/perl/lib/site_perl/sun4-solaris/auto/DBD/Sybase/Sybase.so' for
> module DBD::Sybase: ld.so.1: /apps/perl/bin/perl: fatal: libct.so: open
> failed: No such file or directory at
> /apps/perl/lib/sun4-solaris/5.00404/DynaLoader.pm line 166.
>
>  at (eval 22) line 2

If you have the root access to this system try running it as root. If the
script does not complain when run as root it most probably is a symptom
or a permissions problem. Make sure that appropriate execute permissions
(for the
user X if the web server runs cgi scripts as if they were run by user X )
are turned on in the path
'/apps/perl/lib/site_perl/sun4-solaris/auto/DBD/Sybase/Sybase.so
--






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

Date: Thu, 25 May 2000 14:49:30 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: cgi error (database)`
Message-Id: <392D9FEA.35283583@My-Deja.com>



vikas_jain@planetall.com wrote:

> Hi,
>
> I had written a small perl script to connect to Sybase database using
> DBI calls.
> I am getting the following error (logged in the error_log file of web
> server), but the same script run without any problems on command prompt.
> I would appreciate if someone can throw some light on it.
>
> install_driver(Sybase) failed: Can't load
> '/apps/perl/lib/site_perl/sun4-solaris/auto/DBD/Sybase/Sybase.so' for
> module DBD::Sybase: ld.so.1: /apps/perl/bin/perl: fatal: libct.so: open
> failed: No such file or directory at
> /apps/perl/lib/sun4-solaris/5.00404/DynaLoader.pm line 166.
>

If you have the root access to this system try running it as root. If the
script does not complain when run as root it most probably is a symptom
of a permissions problem. Make sure that appropriate execute permissions
(for the user X if the web server runs cgi scripts as if they were run by
user X )
are turned on for each directory in  the path
'/apps/perl/lib/site_perl/sun4-solaris/auto/DBD/Sybase/Sybase.so
--






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

Date: Thu, 25 May 2000 14:59:28 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: cgi error (database)`
Message-Id: <Pine.GSO.4.10.10005251459090.14618-100000@user2.teleport.com>

On Thu, 25 May 2000 vikas_jain@planetall.com wrote:

> I am getting the following error (logged in the error_log file of web
> server), but the same script run without any problems on command prompt.

When you're having trouble with a CGI program in Perl, here's a handy
troubleshooting guide to get you back on track. 

   http://www.smithrenaud.com/public/troubleshooting_CGI.html

Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 25 May 2000 22:11:43 +0100
From: "B Kemp" <hyagillot@tesco.net>
Subject: Re: cgi name-value pairs , special characters
Message-Id: <8gk550$o35$1@epos.tesco.net>


Alan J. Flavell wrote in message ...
>On Thu, 25 May 2000, W Kemp wrote:
>
>> It seems to work fine,
>
>Oh, please.  Do you _still_ not understand the difference between
>"valid" and mere "seems to work"?


Forgive me, I suspected that this was the case.
I wasn't contradicting you, just my way of asking for clarification.
Your original statement was rather brief (hence tantalising).

Needing to know more, that's why I'm here and why I asked,
 Bill.






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

Date: 25 May 2000 20:08:38 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Copy A File?
Message-Id: <slrn8ir226.rd5.dha@panix6.panix.com>

On Wed, 24 May 2000 08:26:55 -0700, Jürgen Exner <juex@deja.com> wrote:
>"Moltimer" <moltimer@yahoo.com> wrote in message
>news:8gg5tf$eid$1@news2.kornet.net...
>>
>>
>> NoSpam ÀÌ(°¡) ¸Þ½ÃÁö¿¡¼­ ÀÛ¼ºÇÏ¿´½À´Ï´Ù...
>> >What is the Perl command to copy a file from a folder to another?
>> This will works.
>> `cp aaa/file.txt bbb/file.txt`;
>
>Where do you find a "cp" on a MacIntosh?

Or, for that matter, in Perl?

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Well, to make this story the way it should be done we will technology
that won't invented for 30 years and a budget that could pay for a
large south american country."  "What have we got?"  "25 cents and a
block of wood."	- Possible Dr. Who budget conference


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

Date: Thu, 25 May 2000 13:35:47 -0500
From: "Andrew N. McGuire" <andrew.mcguire@walgreens.com>
Subject: Re: Finding IP addresses+
Message-Id: <Pine.GSO.4.21.0005251333100.7198-100000@sputnik.corp.walgreens.com>

On Thu, 25 May 2000, Bart Lateur wrote:

+ Andrew N. McGuire  wrote:
+ 
+ >Huh?  3427256387 in hex is 0xcc47c843!!!
+ >This will do the job:
+ >

[ snip of my code, better off snipped ]

+ Ooh that looks complicated. What's that 'i10'? And "reverse"!?!
+ How about a simple 'N'? 
+ 
+   my $dec_addr = 3427256387;
+   print join '.', unpack 'C4', pack 'N', $dec_addr;

Sorry, ignorance can be a funny thing, as sometimes you
are ignorant of your ignorance.  This was the case with 
my suggestion.  I thought I knew how something worked,
but it is now obvious that I was oblivious.  I apologize.

Best Wishes,

anm
-- 
/*-------------------------------------------------------.
| Andrew N. McGuire                                      |
| andrew.mcguire@walgreens.com                           |
`-------------------------------------------------------*/



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

Date: Thu, 25 May 2000 12:09:37 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Forum for 'how to do it' questions?
Message-Id: <Pine.GSO.4.10.10005251209180.14618-100000@user2.teleport.com>

Right on!

On 25 May 2000, Csaba Raduly wrote:

> Date: 25 May 2000 10:19:53 GMT
> From: Csaba Raduly <csaba_r@my-deja.com>
> Newsgroups: comp.lang.perl.misc
> Subject: Re: Forum for 'how to do it' questions?
> 
> 21 May 2000: A formal bug report was sent to Seti@Home, because the
> following message originated from bart.lateur@skynet.be (Bart Lateur)
> was reported as containing signs of intelligence: 
> 
> [snip]
> >
> >And another thing: snip what you're replying to. I recently saw a
> >post with a lot of different opinions in, about lots aof stuff.
> >Somebody replied to it, quoting the whole damn post, and adding:
> >"Right on!" at the top. Now tell me, what was he agreeing with? The
> >lot? I don't think so.
> >
> 
> Was he from AOL by any chance ? :-)
> 
> 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 25 May 2000 14:56:47 -0400
From: "Andrew Kuster" <andrew@mahler.com>
Subject: frustrating redirect() problem on Win2k
Message-Id: <959280967.808083@axilla.wwnet.net>

I looked in my Perl CD bookshelf and in several Win32 perl script libraries
on the web and can't find what's wrong. I would appreciate anybody's help
with this.

I use a Windows 2000 workstation with IIS 5 and ActivePerl-5.6.0.613
installed.

My problem is with the redirect() function, which works fine when pointing
to an URL, but does not work when also sending a cookie to the client's
browser. The following code takes a username from a form on the previous
page, makes sure it exists in a DBM, sets a cookie and redirects the browser
to another page. The code as given below sends the user to the URL, but does
not set the cookie.

I thought at first the problem was with the path, but after adding the
cookie path, the problem persists.
I also tried adding in redirect() another cookie with the same name set to
expire now, just before sending the cookie below. No change.

Also, I tried adding the -nph tag in the use CGI statement. No change.

Is this a bug in ActivePerl or am I missing something?

CODE FOLLOWS:

#!/usr/bin/perl

use CGI qw(:standard -nph);
use CGI::Carp qw(fatalsToBrowser);
#use DB_File;
use SDBM_File;
use Fcntl;

$fusername = param("username");
$fpassword = param("password");

dbmopen(%h, "C:/InetPub/wwwroot/Vpacs/cgi-bin/bogus2", 0644);

if (exists $h{$fusername}) {
 $redir = "../frames.htm";
} else {
 $redir = "../logonfail.htm";
}

dbmclose(%h);

$cook = cookie(-name   => 'username',
               -value  => $fusername,
               -path   => '/');

#the commented out code creates a cookie that can be accessed by the page
below just fine
#however, the location prints to the browser window and does not actually
change.
#print header( -cookie  => $cook);
#print end_html;
#print "Location: $redir\n\n";

print redirect(-nph     => 1,
               -url     => $redir,
               -cookie  => $cook);

exit;

END CODE

The following code in the interior should return the cookie. It does when
the cookie is set with header() and does not when the cookie is set with
redirect().

CODE FOLLOWS

#!/usr/bin/perl

#find user's farthest allowable page.

use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard -nph);
#use DB_File;
use SDBM_File;
use Fcntl;

#print header();

sub getCookie {

        $cusername = cookie("username") || "fail";

 dbmopen(%h, "C:/InetPub/wwwroot/Vpacs/cgi-bin/bogus2", 0644);

 if (exists $h{$cusername}) {
  ($hunit, $hmodule, $htopic) = split /,/,$h{$cusername};
 }
 print "<p>username = $cusername, unit = $hunit, module = $hmodule, topic =
$htopic</p>\n";

 dbmclose(%h);

}

 ...

END CODE

Thanks for your help

Andrew Kuster
andrew@mahler.com




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

Date: Thu, 25 May 2000 20:22:26 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: frustrating redirect() problem on Win2k
Message-Id: <6YfX4.87837$h01.634554@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <959280967.808083@axilla.wwnet.net>,
	"Andrew Kuster" <andrew@mahler.com> writes:
> My problem is with the redirect() function, which works fine when pointing
> to an URL, but does not work when also sending a cookie to the client's
> browser. The following code takes a username from a form on the previous
> page, makes sure it exists in a DBM, sets a cookie and redirects the browser
> to another page. The code as given below sends the user to the URL, but does
> not set the cookie.

> #print header( -cookie  => $cook);
> #print end_html;
> #print "Location: $redir\n\n";
> 
> print redirect(-nph     => 1,
>                -url     => $redir,
>                -cookie  => $cook);
> 

I think I've answered this a few times in here before.  Make up your
mind.  Are you going to send a regular header, or a redirect?  You 
can't do both.  Search dejanews for redirect, cookie on this group and
you'll find some solutions.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Thu, 25 May 2000 15:24:27 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: GDBM_File
Message-Id: <392d8c06$0$22696@wodc7nh1.news.uu.net>

Hello,
I want to install the GDBM_File to create a DBM file with.
The camel says that the Linkage comes with Perl (page 379)
and also says "Source Bundled With Perl" "NO";

so I am confused. I went to the activestate/packages and looked for the
GDBM_File, but see no package for it.

Does anyone know where to find the package, and if so where?

Thanks
Scott




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

Date: 25 May 2000 19:47:31 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Getting HTML source
Message-Id: <959282864.1069@itz.pp.sci.fi>

In article <8ghpr8$5k1$1@nnrp1.deja.com>, nfsite@my-deja.com wrote:
>That's one doubt I have... If I find a module that is very usefull for
>me, how can I use it in my site? I'm not the webmaster or the "root" of
>the server where my site is.... How can I "say" to perl so that he uses
>the modules I want? By environment variables?

  #!/usr/bin/perl -w
  use strict;
  use lib '/home/iltzu/lib/perl';
  use My::Module;

This loads /home/iltzu/lib/perl/My/Module.pm, assuming it exists.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Thu, 25 May 2000 18:38:56 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Gloval variable
Message-Id: <7azope4gql.fsf@Merlin.i-did-not-set--mail-host-address--so-shoot-me>


garcia_suarez@hotmail.com (Rafael Garcia-Suarez) writes:

> You can't share a variable between processes.

Wrong. Perhaps you meant "You can't easily share a variable between
processes" in which case I would agree with you :-)

The best way would be to use shared memory and semphores, which are
described quite well in 'perlipc'.

--Ala


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

Date: Thu, 25 May 2000 16:58:45 -0400
From: "Nisi" <nisi@nospam_yahoo.com>
Subject: HELP?????
Message-Id: <8gk421$isg$1@nnrp02.primenet.com>

DON'T YOU HATE IT WHEN PEOPLE TYPE A SUBJECT LIEK THAT AND THEN USE ALL CAPS
IN THERE POST AND DON'T POST RELEVANT INFO AND YOU STILL DOWNLOAD AND READ
THERE POST ANYWAYS FOR SOME REASON AND YOU SHOULD KNOW BETTER BUT DON'T, AND
YET AFTER THE FIRST COUPLE LINES YOU KNOW IT IS MEANINGLESS BUT STILL KEEP
ON READING.....

IF THIS IS YOU....then come here to solve your problems
www.mindlessmayhem.com




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

Date: Thu, 25 May 2000 17:38:12 -0400
From: "Malkav Bug" <malkav@strato.net>
Subject: how to /s '[item]'
Message-Id: <j%gX4.59040$681.1149604@news-east.usenetserver.com>

had not had much use for s/ until now to it is giving me some problems
well I am trying to do this before printing the html doc
  $value =~ s/[red]/<font color=red>/g;
  $value =~ s/[\/red]/<\/font>/g;

but of course it is taking every letter r e and d and switching them to it
instead

so my questions, one is this the best way to do this. two how do you write
it correctly to say take JUST " [red] " no more no less and switch it to
FULLY " <font color=red> " without giving any problems such as just saying "
red " or something like that. All help is appreciated, sorry I jiust have
not worked long with the s/ option and would like to resolve this quickly

~Malkavbug
malkav@strato.net

[blue][/blue] =color blue
[gold][/gold] =color yellow
[green][/green] =color green




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

Date: Thu, 25 May 2000 14:41:47 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: how to /s '[item]'
Message-Id: <392D9E1B.FB7C8F9F@My-Deja.com>

>
> but of course it is taking every letter r e and d and switching them to it
> instead

remove the [ and ]  around red
--



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

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


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