[17977] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 137 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 24 21:05:36 2001

Date: Wed, 24 Jan 2001 18:05:11 -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: <980388310-v10-i137@ruby.oce.orst.edu>
Content-Type: text

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

Today's topics:
        #!C:\perl.exe -t <diab.lito@usa.net>
    Re: #!C:\perl.exe -t (Damian James)
        calling java from perl as a cgi basoft@my-deja.com
    Re: change tmp dir for file upload in cgi (David Efflandt)
        FREE SErvice <newsgroups@ebagus.com>
    Re: How can i delete an item in the middle of an array <uri@sysarch.com>
    Re: How can i delete an item in the middle of an array (Abigail)
    Re: How can i delete an item in the middle of an array <tore@extend.no>
        huh? <hanja@my-deja.com>
        MIF and PERL <hanja@my-deja.com>
    Re: Newbie question : Read configuration file. (Craig Berry)
    Re: Newbie question : Read configuration file. (Craig Berry)
    Re: Passing parameters to a script (David de Gruyl)
        perl editors <hanja@my-deja.com>
    Re: perl editors <tore@extend.no>
    Re: perl editors <wyzelli@yahoo.com>
    Re: printing to a printer? <hanja@my-deja.com>
        Reading form input <sdoraira@vt.edu>
    Re: Reading form input (Damian James)
    Re: RegEx: Removing spaces between tags <hugh@grugach.freeserve.co.uk>
    Re: RegEx: Removing spaces between tags (Craig Berry)
    Re: Spawning Parallel Processes arkconfused@hotmail.com
    Re: sprint replaces spaces with tabs in my text <chrisw@dynamite.com.au>
        Totally strange <edd@texscene.com>
    Re: Totally strange <wyzelli@yahoo.com>
    Re: Upgrading to Perl 5.6 under Debian 2.2 (Damian James)
    Re: Upgrading to Perl 5.6 under Debian 2.2 (Damian James)
    Re: Upgrading to Perl 5.6 under Debian 2.2 (Martien Verbruggen)
    Re: Using a sub to give grep a boolean. <johngros.NOSPAM@bigpond.net.au>
        write ignores $= <paulw@accesscable.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 24 Jan 2001 23:55:00 GMT
From: Mario <diab.lito@usa.net>
Subject: #!C:\perl.exe -t
Message-Id: <94nq0h$4r6$1@nnrp1.deja.com>

How to setup the -t mode on activeperl?

I get an error (can't emulate ...) while using #!C:\Perl/bin/perl.exe -t

Thanks anyone.
--
Mario


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


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

Date: 25 Jan 2001 00:12:04 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: #!C:\perl.exe -t
Message-Id: <slrn96urrj.r9n.damian@puma.qimr.edu.au>

Thus spake Mario on Wed, 24 Jan 2001 23:55:00 GMT:
>How to setup the -t mode on activeperl?
>
>I get an error (can't emulate ...) while using #!C:\Perl/bin/perl.exe -t
>

See the perlrun manual page -- remembering that Perl is case sensitive.

HTH

Cheers,
Damian


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

Date: Thu, 25 Jan 2001 00:09:31 GMT
From: basoft@my-deja.com
Subject: calling java from perl as a cgi
Message-Id: <94nqrk$5gu$1@nnrp1.deja.com>

I have a perl program in my cgi-bin directory which invokes a java
program via backtics.

It works as expected from the unix command line but not when called
from a web page. Both the perl and java programs have full executable
attributes.

The perl program contains the statement
$response = `java myapplication.ja`;
print "$response\n";
print $?/256;

When executed directly I get the correct data from the java program
then a '0' (the return code) but from the web page I get simply '1'.

Can anyone shed some light on this ?.

Incidentally, if I make the first line
$response = `date`;
it works correctly both ways.


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


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

Date: Thu, 25 Jan 2001 01:57:02 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: change tmp dir for file upload in cgi
Message-Id: <slrn96v1uf.e18.efflandt@efflandt.xnet.com>

On Wed, 24 Jan 2001, venkatmohan@my-deja.com <venkatmohan@my-deja.com> wrote:
>Is it possible to change the temporary directory where the files are
>uploaded (through the input type file html form item).
>
>By default it uploads to /var/tmp I want to change this directory to
>some other directory.
>
>CGI documentation instructs to set $ENV{TMPDIR}
>
>But that doesn't works.  I am using apache web server.

You might be able to use SetEnv directive for Apache, but that does not
work for suexec.

You probably have to define TMPDIR in a BEGIN block, because if you try to
simply set it in the script your 'use CGI ...;' statement is executed
during precompile before any regular statements.  Example:

BEGIN { $ENV{TMPDIR} = '/whatever'; }
use CGI qw/:standard/;

Just make sure that the user CGI is running as has full permission for
that dir (or same permissions as your /var/tmp?).

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


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

Date: Thu, 25 Jan 2001 09:27:44 +0800
From: "Free content" <newsgroups@ebagus.com>
Subject: FREE SErvice
Message-Id: <94nv9d$gl6$5@mango.singnet.com.sg>

http://www.ebagus.com









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

Date: Wed, 24 Jan 2001 23:07:59 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How can i delete an item in the middle of an array
Message-Id: <x77l3kwnu8.fsf@home.sysarch.com>

>>>>> "t" == telecino  <telecino@cinoche.com> writes:

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

perldoc -f grep

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 25 Jan 2001 00:01:10 GMT
From: abigail@foad.org (Abigail)
Subject: Re: How can i delete an item in the middle of an array
Message-Id: <slrn96ur66.a8v.abigail@tsathoggua.rlyeh.net>

telecino (telecino@cinoche.com) wrote on MMDCCIII September MCMXCIII in
<URL:news: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.

grep


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: Thu, 25 Jan 2001 02:40:58 +0100
From: Tore Aursand <tore@extend.no>
Subject: Re: How can i delete an item in the middle of an array
Message-Id: <MPG.14d9a294e51a3f1198985e@news.online.no>

In article <B694CA23.C21%telecino@cinoche.com>, telecino@cinoche.com 
says...
> 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 delete
> it from the array, but i don't know it's position, so i can't use
> splice.

my @array = qw( a b c d X e f g h);
my $not_wanted = 'X';
my @new_array = grep(!/^$not_wanted/, @array);


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


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

Date: Thu, 25 Jan 2001 00:09:41 GMT
From: hanja <hanja@my-deja.com>
Subject: huh?
Message-Id: <94nqru$5h1$1@nnrp1.deja.com>

I came across these two lines at the top of a script, and I am curious
of what they mean.


#!/bin/sh--#-*-perl-*-
eval 'exec /usr/test/ap_cp/perl5/bin/perl -S $0 ${1+"$@"}' if 0;


I think the first line is invoking PERL.  Howerver, is there an
advantage of using that line over "#!/usr/local/bin/perl5"?

-hanja


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


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

Date: Wed, 24 Jan 2001 23:42:18 GMT
From: hanja <hanja@my-deja.com>
Subject: MIF and PERL
Message-Id: <94np8o$48m$1@nnrp1.deja.com>

This is urgent.  I need to find some scripts that uses MIF files.  Can
you help?

-hanja


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


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

Date: Wed, 24 Jan 2001 23:26:18 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Newbie question : Read configuration file.
Message-Id: <t6up4qlbakmq26@corp.supernews.com>

Damian James (damian@qimr.edu.au) wrote:
: >It is (see 'require' and 'use') if your config file is itself valid perl,
: >which yours is not.  But it's also pretty easy to read and parse the sort
: >of file you show below.  Do note that it's vastly superior to read
: >configuration parameters and their values into a hash (like %cfg) and
:                                                   ^^^^
: Indeed -- I'm not sure why you suggest symrefs instead below.

Because the OP stated that he already had code containing references to
config values as simple scalars.  In that sort of situation, there are
arguments both ways.  Working from a clean slate, the hash solution would
always* be better.

* Always = Always except in a few special cases not worth hashing out --
  excuse the pun -- here.

: >reference them through that, rather than blindly creating variables in the
: >package.  But this is harder to do post facto, if your code already has
: >lots of raw-scalar config variable references.
: 
: Surely it's better to fix these rather than await future scoping problems
: and namespace conflicts?

It's a tradeoff.  How long will the script remain in use?  How many fix
points would be required?  And so forth.  Sometimes (though more often
not) a quick hack that gets the job done simply is prefered, even if it
decreased maintainability and introduces risks.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "The hills are burning, and the wind is raging; and the clock
   |   strikes midnight in the Garden of Allah." - Don Henley


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

Date: Wed, 24 Jan 2001 23:30:59 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Newbie question : Read configuration file.
Message-Id: <t6updji51onba@corp.supernews.com>

Andy Geraerts (angeraer@hotmail.com) wrote:
: > Assuming config file is open as CFG:
: >   while (<CFG>) {
: >     next if /^#/;                  # Discard comments
: >     next unless /^(\w+)=(.*)/;     # Ignore bad syntax, empty lines
: >     $$1 = $2;
: >   }
: 
: Thanks, I used the above solution and it works great! Just what I needed.
: Didn't know you could create new variables like that.

Glad I could help.  Do note that creating new variables by name like that
(a technique called "symbolic referencing") is generally a Bad Thing, as I
and other posters have noted.  Far better to create a %config hash and
store attribute-value pairs in it.

: Could you please explain the "next unless /^(\w+)=(.*)/;" line? :-)

It matches lines that look like variable assignments -- "string of word
chars [A-Za-z0-9_] starting at the beginning of the line, followed by an
equals sign, followed by any characters up to but not including the
newline.  The two matching strings of characters get saved as $1 and $2 as
a side effect of the match.

Note that you can tweak the regular expression to make it more flexible;
for example, you might allow and ignore whitespace on either side of the
=, or at the start or end of the string, or ignore anything between # and
the end of the string (allowing line-end comments), or whatever.
Experimentation will be rewarded...

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "The hills are burning, and the wind is raging; and the clock
   |   strikes midnight in the Garden of Allah." - Don Henley


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

Date: Wed, 24 Jan 2001 19:02:31 EST
From: degruyl@superlink.net (David de Gruyl)
Subject: Re: Passing parameters to a script
Message-Id: <94nqen$23m7$1@earth.superlink.net>

On Tue 23 Jan, Miguel Manso <mmanso@localhost.localdomain> wrote:
>  I'm trying to write a perl script that accepts three optional
>  parameters.  Lets say: PARAM1, PARAM2 and PARAM3

>  When I execute the program like:

>  program.pl PARAM1 PARAM2 PARAM3

>  i know that the the parameters will be available in the @ARGV array.

>  Now, has told, the parameters are optional, so, if I call the script
>  like:

>  program.pl PARAM1 PARAM3

>  the @ARGV will have two elements and I can't tell which one is
>  which... I mean, $ARGV[1] in this case is PARAM3 and not PARAM2.

>  Is there any technique to avoid this problem?

The easiest way is to use command line switches, and one of the Getopt
modules.

This will place the parameter in variables as defined by the particular
getopt package you use.

I believe that both Getopt::Std and Getopt::Long are part of the
standard perl distribution, so the documentation should be on your
computer.

You can find other packages at http://search.cpan.org, and search for
Getopt.

-- 
David de Gruyl <degruyl@superlink.net>
 


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

Date: Wed, 24 Jan 2001 23:41:37 GMT
From: hanja <hanja@my-deja.com>
Subject: perl editors
Message-Id: <94np7f$483$1@nnrp1.deja.com>

Out of curiousity, what editor do you use to write your scripts?

-hanja


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


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

Date: Thu, 25 Jan 2001 02:42:29 +0100
From: Tore Aursand <tore@extend.no>
Subject: Re: perl editors
Message-Id: <MPG.14d9a2ee9b2511e698985f@news.online.no>

In article <94np7f$483$1@nnrp1.deja.com>, hanja@my-deja.com says...
> Out of curiousity, what editor do you use to write your scripts?

Linux: fte
Win32: fte

:-)

Search for it at www.sourceforge.net.  It haven't been updated for 
ages, but works like a dream; small, fast and does what it should do.


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


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

Date: Thu, 25 Jan 2001 11:36:29 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: perl editors
Message-Id: <bKLb6.13$K85.4747@vic.nntp.telstra.net>

"hanja" <hanja@my-deja.com> wrote in message
news:94np7f$483$1@nnrp1.deja.com...
> Out of curiousity, what editor do you use to write your scripts?
>

pico
Perlbuilder 2.0a Pro
notepad
edit (if I have to)

(Not advocating any... just saying what I use..)

Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_!=1)? 's':'';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';





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

Date: Wed, 24 Jan 2001 23:46:13 GMT
From: hanja <hanja@my-deja.com>
Subject: Re: printing to a printer?
Message-Id: <94npg2$4cj$1@nnrp1.deja.com>

JH,

Sorry about that.  I haven't actually tried and this is for UNIX.  I
asked because after reading two PERL books neither one mention printing
to a printer.  I was just curious.

-hanja


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


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

Date: Wed, 24 Jan 2001 23:08:32 GMT
From: Sundar <sdoraira@vt.edu>
Subject: Reading form input
Message-Id: <94nn98$291$1@nnrp1.deja.com>

After some testing, I figured out my problem has nothing to do with
JavaScript. The input fields are not being read by my Perl script. When
the code is run below, my archive file ($form_info_path) looks like

server.vt.edu\t\t\n

and simply ignores the form inputs.

Here is the simplified code:

# CGI code:
&write_form_info;

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";

<!-- HTML code: -->
<form
name=finish
method="POST"
action="http://my.server/cgi-bin/finish.cgi">

<input type='hidden' name='id' value='123'>
<input type='hidden' name='time' value='0:00:10'>
<input type='hidden' name='redirect' value='http://blah.com'>
<input type="submit" value="Take Quiz">
</form>

Hope someone can help.

Sundar

--
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: 24 Jan 2001 23:35:04 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Reading form input
Message-Id: <slrn96upm7.ndt.damian@puma.qimr.edu.au>

Thus spake Sundar on Wed, 24 Jan 2001 23:08:32 GMT:
>After some testing, I figured out my problem has nothing to do with
>JavaScript. The input fields are not being read by my Perl script. When
>the code is run below, my archive file ($form_info_path) looks like
>
>
>Here is the simplified code:
>
># CGI code:
>&write_form_info;
>
>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);
>}

You still don't say how %input is being populated. Are you using the CGI
module? How are you parsing the CGI data?

Cheers,
Damian


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

Date: Wed, 24 Jan 2001 23:04:25 -0000
From: "Hugh Williams" <hugh@grugach.freeserve.co.uk>
Subject: Re: RegEx: Removing spaces between tags
Message-Id: <94nmug$ubo$2@newsg1.svr.pol.co.uk>

"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:94n11d$k33$1@mamenchi.zrz.TU-Berlin.DE...
> <bobbybobbob@my-deja.com> wrote in comp.lang.perl.misc:
> >Greets,
> >
> >I've been trying to figure out a regex for removing trailing spaces by
> >tags, to no avail.
> >
> >I want to get rid of spaces to the left and to the right of a pattern
> >like this:
> >
> ><some tag='fds'>   Hello World   </some>
> >                ^^^           ^^^
> >
> >Any ideas, hints? I seem to fail at the "ignore <.*?>" parts. Thanks!
>
> Well, the "ignore <.*?>" part implies parsing HTML, no more, no less.
> You can't do that with a simple regex.  Use HTML::Parser (available
> from CPAN if you don't have it) to parse out the text.
>
A regex can parse brackets if they're not nested. You could use "<[^>]*>" to
match the tag. It would however fail if the tag contained a ">" (e.g. in
quotes). It might be easier just to use the parser.

Hugh





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

Date: Wed, 24 Jan 2001 23:41:12 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: RegEx: Removing spaces between tags
Message-Id: <t6uq0o5firk8b4@corp.supernews.com>

bobbybobbob@my-deja.com wrote:
: To put the problem another way ... is there a way to trim off spaces to
: the right of ">" and to the left of "<" with a simple regex?

If you're willing to do it that blindly, without regard to the niceties of
html syntax (comments, javascript, etc.), then this pair should suffice:

  s/>\s+/>/g;
  s/\s+</</g;

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "The hills are burning, and the wind is raging; and the clock
   |   strikes midnight in the Garden of Allah." - Don Henley


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

Date: Wed, 24 Jan 2001 23:55:39 GMT
From: arkconfused@hotmail.com
Subject: Re: Spawning Parallel Processes
Message-Id: <94nq1n$4ss$1@nnrp1.deja.com>

In article <JTja6.16602$Kl5.2085640@typhoon.southeast.rr.com>,
  "David Sisk" <davesisk@ipass.net> wrote:
> Hi:
>
> I know your pain.  I couldn't find a good example of this anywhere
(or at
> least not one I understood)  Search this newsgroup for a posting
called
> "fork lots of children".  A fellow posted an example a couple of days
ago
> that shows exactly how to do what you want.  It doesn't use signals,
which
> (to my understanding) is a good thing.
>
> Regards,
> Dave
>
> <arkconfused@hotmail.com> wrote in message
> news:94au46$lrp$1@nnrp1.deja.com...
> > I have been trying to look at away to have a perl script spawn off 7
> > processes and to have them run at the same time.  Each process
telnets
> > into a different server.  Any ideas?
> >
> > --
> > ARKConfused
> >
> > arkconfused@hotmail.com
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
>
>

Thank you all.  David, thank you for pointing my to those articles!

--
ARKConfused

arkconfused@hotmail.com


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


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

Date: Thu, 25 Jan 2001 11:32:54 +1100
From: "Chris W" <chrisw@dynamite.com.au>
Subject: Re: sprint replaces spaces with tabs in my text
Message-Id: <zwKb6.28$d76.2006@news0.optus.net.au>

<nelsonjames@my-deja.com> wrote in message
news:94nlvh$11u$1@nnrp1.deja.com...
> I hope someone knows how to preserve the oringinal
> spaces in this problem.

The tabs are coming from wrap() not sprintf(), at least on the Win32 version
of Perl I'm using.  It is trying to be intelligent.   It, actually
Text::Tabs unexpand() function, sees the spaces used to pad your first field
and decides that it is more efficient to insert one or two tabs to get you
to the sixteen character boundary.

I initially thought you could get rid of some of this behaviour by inserting
the following lines:

use Text::Tabs;
$Text::Tabs::tabstop = 0;

before you use wrap().   This seems to move the inserted tabs elsewhere :(

Some options:
1. Pad the $VARR with something other than spaces (say ^ or %), wrap into a
variable and then substitute spaces before output.
2. Manually format this stuff.   Have you looked at Perl's format and write
statements?

Hope this helps.




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

Date: Thu, 25 Jan 2001 00:12:41 -0000
From: "Edd" <edd@texscene.com>
Subject: Totally strange
Message-Id: <3a6f6d6c@news-uk.onetel.net.uk>

Hi,

I am totally lost as to why a  web page created by my PERL code cannot be
seen by other visitors while I can see it without any problems from my
computer.

Other visitors just sees a blank page. This code receives data from an HTML
form on a web page then parses it, stores it into a mysql database, then
creates a web page using this information.

I can see the new data in this new page which has been put by other
visitors, but they can't get into that page themselves. When They put the
URL of that page, a blank page comes up. I don't think it is to do with
Permissions because, no such message appeares. No such message as "The Page
Is Not Found" either.

Just a white blank page comes up.

Please advise if you can.

Edd.





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

Date: Thu, 25 Jan 2001 09:51:36 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Totally strange
Message-Id: <QbKb6.11$K85.4141@vic.nntp.telstra.net>

"Edd" <edd@texscene.com> wrote in message
news:3a6f6d6c@news-uk.onetel.net.uk...
> Hi,
>
> I am totally lost as to why a  web page created by my PERL code cannot
be
> seen by other visitors while I can see it without any problems from my
> computer.
>
> Other visitors just sees a blank page. This code receives data from an
HTML
> form on a web page then parses it, stores it into a mysql database,
then
> creates a web page using this information.
>
> I can see the new data in this new page which has been put by other
> visitors, but they can't get into that page themselves. When They put
the
> URL of that page, a blank page comes up. I don't think it is to do
with
> Permissions because, no such message appeares. No such message as "The
Page
> Is Not Found" either.
>
> Just a white blank page comes up.
>
I think you failed to close the table properly on line 56.

How about posting something we can look at?

Wyzelli
--
@x='07411711511603209711011111610410111403208010111410803210409709910710
1114'=~/(...)/g;
print chr for @x;




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

Date: 25 Jan 2001 01:07:10 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Upgrading to Perl 5.6 under Debian 2.2
Message-Id: <slrn96uv2t.k.damian@puma.qimr.edu.au>

Thus spake Paul King on Wed, 24 Jan 2001 16:14:20 GMT:
>...
>The root of many of the problems after the upgrade was in wondering
>how @INC was set (since it complained about this-and-that library not
>being found under @INC), and I later decided that it was easier to
>reinstall Debian's Perl 5.005 over again. If there was a way to set
>@INC or (a previous poster suggested) PERL5LIB, I have a feeling
>things would install fairly invisibly, as I would expect.

See the lib manpage ('perldoc lib'). PERL5LIB is just an environment
variable -- check the output of set, setenv or env depending on your
shell.

>
>What did you do to get @INC to work?
>

By setting PERL5LIB and PERLLIB to different things. This won't work for
you, since both your perl versions will use PERL5LIB. You COULD do some
hack like only run your 5.6 programs from an environment that has PERL5LIB
set, and unset it for 5.005 (assuming 5.005 is compiled with the right lib
paths). Or run them via a shell script that changes PERL5LIB.

Otherwise you could set something like PERL560LIB and add something
like @INC = split /:/, $ENV{PERL560LIB}; to the beginning of your program
files. This is also something you want to avoid doing.

I though Debian rev'd frequently -- isn't there an upgrade that includes
5.6?

HTH

Cheers,
Damian


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

Date: 25 Jan 2001 01:09:44 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Upgrading to Perl 5.6 under Debian 2.2
Message-Id: <slrn96uv7n.ob.damian@puma.qimr.edu.au>

So blathered Damian James on 25 Jan 2001 01:07:10 GMT:
>...
>See the lib manpage ('perldoc lib'). PERL5LIB is just an environment
>variable -- check the output of set, setenv or env depending on your
>shell.
>

s/lib/perlrun/g;

Just not with it today. :-)

Cheers,
Damian


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

Date: Thu, 25 Jan 2001 01:39:03 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Upgrading to Perl 5.6 under Debian 2.2
Message-Id: <slrn96v0rn.213.mgjv@verbruggen.comdyn.com.au>

[Removed groups again]

On Wed, 24 Jan 2001 16:00:16 GMT,
	Debian User <pking123@sympatico.ca> wrote:
> In article <slrn96tjfr.n5q.mgjv@martien.heliotrope.home>,
> mgjv@tradingpost.com.au  wrote:
> 
>> [removed comp.lang.perl. That group hasn't existed for years. Notify
>> your news admin]
>> [remove alt.perl. That group doesn't exist as far as I'm concerned]
>> 
> 
> There are about 500+ posters who don't seem to agree with you :) However,
> unless there is proof that the forementioned groups are deprecated, I
> am in favour of posting anywhere I feel I can obtain the proper help.

comp.lang.perl ceased to exist when the current structure under
comp.lang.perl.* was put in place. The fact that many news admins
still carry it doesn't make it right. It's just laziness.

I remove alt.perl, because, frankly, I cannot see any reason to have a
perl group in the alt hierarchy that would discuss language issues.
besides that, only one of the news servers I use carries it.

>> On Wed, 24 Jan 2001 11:54:22 GMT,
>> 	Debian User <pking123@sympatico.ca> wrote:
>>> Hello:
>>> 
>>> In brief, I changed my mind about upgrading to 5.6 under Debian due to
>>> the problems it was causing in the operating system.
>> 
>> I doubt it sincerely. Perl would not in any way cause your OS to become
>> unstable. Maybe you've got some tools that were expecting another
>> version of Perl, and that didn't deal with the newer version correctly,
>> but I'd hardly call that 'problem in the operating system'.
> 
> No. There are simply tools that version 5.6 claims does not exist, when
> they in fact do. They break dselect and some window manager applets. I 
> think was clear enough about what I meant when I said "problems in the
> operating system", having now repeated myself. These are "system programs",
> as far as I am concerned. Having dropped back to the original version has
> fixed these problems.

Ok. I misunderstood what you meant by your original statement. 

>> What exactly were the symptoms? And maybe you should report them to
>> Debian, so they can investigate how it is possible that something like
>> Perl can cause their OS to have problems.
> 
> I think the real cause is Debian's over-dependance on Perl, and on its
> insistance to "expect" files such as libraries and modules to be in a
> certain place. That place being, a non-version-specific directory tree under 
> /usr/lib/perl5. After upgrading, all that was "forgotten", even though
> the files were stil there. My question concerns: how can I upgrade in
> such a way that the new Perl "remembers" where the old libraries/modules are?
> (you might have answered that below)

Perl 5.6.0 does some things slightly differently when deciding which
bits of the lib tree to look at to find modules. There is some
discussion on this in the INSTALL file, under 

=head1 Coexistence with earlier versions of perl5

you'll also need to note the sections that talk about binary
compatibility with 5.005 extensions. The section

=head2 Upgrading from 5.005 to 5.6.0

is short, but points back to the one mentioned earlier.

I still find it a bit odd that the modules couldn't be found at all.
According to INSTALL they should be..

>>> The upgrading I was doing was through CPAN using the Perl shell
>>> command:
>>>     perl -MCPAN -e shell
>>> and then using various "install" commands for each module or  library.
>>> But this appears to break many of Debian's scripts.
>> 
>> Well... No offense, but then the Debian scripts are broken. They
>> shouldn't care.
>> 
>>> Any help on how to upgrade Perl while recognising Debian's  scripts and
>>> libraries would be appreciated.
>> 
>> I fail to see the real problem. If you upgrade Perl in-place, you should
>> still have all your old modules around. 
> 
> Correct. They in fact, are still around. The new Perl just doesn't notice
> them.

odd... That is what surprises me, since it is explicitly stated that
Perl should look in the old lib tree of Perl, UNLESS Debian actually
has changed @INC in Configure.pm. You might need to carry those
changes over manually.

>> if you install a new version in
>> a different place, you just need to install the appropriate modules, or
>> set PERL5LIB.
> 
> Pardon my ignorance, but where do I set this? /etc/profile?

In your environment. It's an environment variable. You either put it
in your .login or .profile, or in a system wide login file
(/etc/profile or something like that)

I'd have a thorough read of INSTALL, and check all the mentions of
5.005 in there. 

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Unix is the answer, but only if you
Commercial Dynamics Pty. Ltd.   | phrase the question very carefully
NSW, Australia                  | 


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

Date: Thu, 25 Jan 2001 00:09:57 GMT
From: "John Boy Walton" <johngros.NOSPAM@bigpond.net.au>
Subject: Re: Using a sub to give grep a boolean.
Message-Id: <p9Kb6.81478$xW4.632595@news-server.bigpond.net.au>


"John Boy Walton" <johngros.NOSPAM@bigpond.net.au> wrote in message
news:c_rb6.79952$xW4.617867@news-server.bigpond.net.au...
> I cannot seem to get grep to do what I want.
> I have checked perlfunc and searched deja.com.
> My text file contains the following.
It is OK I finally found it was not my use of grep.
I was using a bad test.




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

Date: Wed, 24 Jan 2001 19:19:17 -0400
From: "Paul Williams" <paulw@accesscable.net>
Subject: write ignores $=
Message-Id: <SoJb6.123237$Z2.1522645@nnrp1.uunet.ca>

I'm trying to break a report at record length (38 lines). I have a
REPORT_FILE format and REPORT_FILE_TOP. I tried a global $= = 38; (and 10
for exaggeration) but I always get a new _TOP every 60 lines. Any idea why?
paul williams





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

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


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