[16570] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3982 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 11 09:05:40 2000

Date: Fri, 11 Aug 2000 06:05:26 -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: <965999126-v9-i3982@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 11 Aug 2000     Volume: 9 Number: 3982

Today's topics:
    Re: 'require'd functions access main variables (Keith Calvert Ivey)
    Re: 'require'd functions access main variables (Anno Siegel)
    Re: -T and %ENV{'PATH'} (Villy Kruse)
    Re: [Q]s: sizeof in perl, ioctl.ph... (Ilya Zakharevich)
    Re: Active Perl for Linux...   (Martien Verbruggen)
    Re: Apache/EmbPerl on Win32 Platform <par@bahnhof.removethis.se>
    Re: calculating with getting a formula out of a $string nobull@mail.com
    Re: calculating with getting a formula out of a $string <domi@boulevards.de>
        CPAN problem <herbmoses@worldnet.att.net>
        create process on windows platform ()
    Re: create process on windows platform <elephant@squirrelgroup.com>
    Re: DBD oracle install HELP! - LD [lnetv2] ?? <rereidy@indra.com>
    Re: DBI: LAST_INSERT_ID() getting the value of <gellyfish@gellyfish.com>
    Re: Digest MD5 of Perl <Peter.Dintelmann@dresdner-bank.com>
    Re: File handle and symbolic link maheshasolkar@engineer.com
    Re: File handle and symbolic link <elephant@squirrelgroup.com>
        FileField Problem <jsr@lucent.com>
    Re: Forbidden You don't have permission to access /cgi- <stumo@bigfoot.com>
    Re: Forbidden You don't have permission to access /cgi- <alesr@siol.net>
    Re: form replies in HTML <jtalbain@nospam.kimochi3d.com>
    Re: Get the Time <as@if.com>
    Re: GREP - type of script... <lr@hpl.hp.com>
    Re: Help with PPM brianr@liffe.com
        How to know if a scalar contain string or numeric data? ()
    Re: How to know if a scalar contain string or numeric d <elephant@squirrelgroup.com>
    Re: How to know if a scalar contain string or numeric d <maheshasolkar@engineer.com>
    Re: How to know if a scalar contain string or numeric d nobull@mail.com
    Re: How to know if a scalar contain string or numeric d (Anno Siegel)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 11 Aug 2000 04:05:40 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: 'require'd functions access main variables
Message-Id: <39977b27.6084667@news.newsguy.com>

Tim Conrow <tim@ipac.caltech.edu> wrote:
>Blair Heuer wrote:
>> In the main script:
>> 
>>     &load( 'standard' );
>> 
>> In a required 'parse.pl' file:
>> 
>>     sub load() {
>
>Do you know what 'sub load() {...}' means? See perlsub. The '()' is a prototype
>telling perl that load doesn't take any args. If you call it as you did you
>should get an error message.

Not according to perlsub:

#   Not only does the ``&'' form make the argument list
#   optional, but it also disables any prototype checking 
#   on the arguments you do provide.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: 11 Aug 2000 10:28:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: 'require'd functions access main variables
Message-Id: <8n0kg7$89v$1@lublin.zrz.tu-berlin.de>

Blair Heuer <ab@cd.com> wrote in comp.lang.perl.misc:

>Okay, I made a sample similar to this, to test what I was trying to do on a
>smaller scale:
>
>one.pl:
>    #!/usr/bin/perl -w
>    use strict;
>    require( 'two.pl' );
>    my $global = 'I exist!';

Ugh.  Despite its name, $global, declared with my(), is a variable
with lexical scope, meaning it is invisible outside the block is
is declared in.  In this case the block, in absence of surrounding {},
is the file.  So you have just made sure that $global is invisible
to a subroutine that's defined in another file.


>    &do_you_exist();
>two.pl:
>    #!/usr/bin/perl -w

You don't need a hashbang line in a module, because it will not normally
be called as an executable.  Exceptions granted.

>    use strict;
>    sub do_you_exist { print $global; }
>    1;
>
>I get the following error:
>    Global symbol "$global" requires explicit package name at two.pl line 5.
>    Compilation failed in require at one.pl line 5.

This is another point.  Under "strict vars", you'd have to fully qualify
the variable name: $main::global.

Anno


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

Date: 11 Aug 2000 07:26:40 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: -T and %ENV{'PATH'}
Message-Id: <slrn8p7alf.dms.vek@pharmnl.ohout.pharmapartners.nl>

On Fri, 11 Aug 2000 00:37:22 GMT, Johnny Amos <johnny@johnnyamos.com> wrote:
>I am writing a script (my first) and i am using Taint mode.
>I forgot to set %ENV{'PATH'} initially and got the usual warning, but
>when I set %ENV{'PATH'} I got a 500 Server Error message instead.
>
>Here's how I set %ENV{'PATH'}:
>
>$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/lib';
>
>What am I doing wrong?
>


Without the error output that probly is found in the webserver's
error log it is hard to tell.

It is unusual, though, to include /usr/lib in the PATH.  This,
however, would hardly make any difference with respect to the problem.



Villy


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

Date: 11 Aug 2000 05:19:45 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: [Q]s: sizeof in perl, ioctl.ph...
Message-Id: <8n02dh$cb1$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Abe Timmerman 
<abe@ztreet.demon.nl>],
who wrote in article <hrd6ps0lecrrotflnj5jfbg0pg3413lulk@4ax.com>:
> > But I know of no easy, portable way of finding out what $sizeof_x
> > should be.  (Obviously, this is a gap in my knowledge, because it is
> > just not possible that Perl would lack the functionality of C's
> > sizeof.)
> 
> No need for it in this case:
> 
> 	perldoc -f pack
> 
> 	L An unsigned long value.
> 		(This 'long' is _exactly_ 32 bits, which may differ from
> 		what a local C compiler calls 'long'.  If you want
> 		native-length longs, use the '!' suffix.)
> 
> But if you don't believe perlfunc:

Bits have nothing to do with sizeof().  sizeof() measures the number
of bits *relative* to the number of bits in a char.  Given a 64-bit
char (which is quite common), sizeof 32-bit data should be 1 (since
any number type will be stored in at least one char).

[But I never worked in Crays, so it may wrong ;-]
Ilya


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

Date: 11 Aug 2000 12:18:37 GMT
From: mgjv@martien.heliotrope.home (Martien Verbruggen)
Subject: Re: Active Perl for Linux...  
Message-Id: <slrn8p7rju.ee0.mgjv@martien.heliotrope.home>

On Thu, 10 Aug 2000 23:47:14 GMT, Ben Kennedy <bkennedy@hmsonline.com>
	wrote:
> 
> "Lou Moran" <lmoran@wtsg.com> wrote in message
> news:8vOSOQ4MBGAr6pkczJUWnGYu0xM0@4ax.com...
> > --Any advantages, dis-advantages?
> 
> You get all the advantages/disadvantages of rpm packages - the good
> things would be easy install/verification/upgrade/un-install.  The bad
> things would be little/no ability to customize - it looks like the
> activestate packages have thread support bultin the binary for
> instance.  As to advantages to Red Hat Perl, I think that also is
> installed via a rpm package, and there are too many dependencies to
> remove it gracefully.  Trying to add another perl rpm may really mess
> things up, I would recommend installing the latest Perl in a different
> directory (which 5.6.0 should), and changing the symlinks in /bin.

Almost all prepackaged RedHat perls I've ever seen are broken in some
way, if not out of date by several months at release of a new RedHat
version. To fix:

# rpm --nodeps -e perl
# cd /spare/src/perl
# tar xzvf perl-5.6.0.tar.gz
# cd perl-5.6.0
# sh Configure -des -Dprefix=/opt/perl-5.6.0
# make
# make test
# make install
# ln -s /opt/perl-5.6.0 /opt/perl
# ln -s /opt/perl/bin/perl /usr/local/bin/perl
# ln -d /opt/perl/bin/perl /usr/bin/perl

Fixed.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.   | you come to the end; then stop.
NSW, Australia                  | 


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

Date: Fri, 11 Aug 2000 08:21:24 GMT
From: Par Svensson <par@bahnhof.removethis.se>
Subject: Re: Apache/EmbPerl on Win32 Platform
Message-Id: <8IOk5.29$7P4.36612@news.bahnhof.se>

jason <elephant@squirrelgroup.com> wrote:

> this is not a Perl issue .. it's an issue with installing a handler on 
> an Apache web server (it's also a problem that you would face whether on 
> Win32 or not) .. please post your question to an appropriate newsgroup

> AND your newsreader has set your line width to at least 86 chars .. it 
> should be something closer to 72 (to allow a reasonable number of 
> followups) .. you'll find that my newsreader is just going to truncate 
> those lines


Thank you for your kind help.

/Par



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

Date: 11 Aug 2000 12:31:58 +0100
From: nobull@mail.com
Subject: Re: calculating with getting a formula out of a $string
Message-Id: <u966p8vxsh.fsf@wcl-l.bham.ac.uk>

Dominik Leinfelder <domi@boulevards.de> writes:

> I want to calkulate from an $int with a $formula (like "*1.16").

eval "$int$formula";

Of course you are trusting that $formula is valid Perl and will not
contian any malicious code.  If you don't want to make this assumption
then use Safe.

It is probably better to use a CODE reference than a string so that
the formula can be precompiled.

# Don't do this
$formula = '*1.16';
eval "$int$formula";

# Do do this
$formula = sub { $_ * 1.16 };
do { local $_ = $int; &$formula };

Note: I'm using the $_ parameter convention here for passing a single
argument to a subroutine.  You can use the more conventional @_
convention if you prefer:

$formula = sub { $_[0] * 1.16 };
$formula->($int);

> I'm getting the values out of a DBMS.

You mean that you are getting '*1.16' out of a DBMS?

$formula = eval "sub { \$_ $formula }";

Of course you are still trusting that $formula will not contain any
malicious code.  If you don't want to make this assumption then use
Safe.

Better still, if this is only to be used in Perl, put '$_*1.16' in the
database in the first place as this allows far more fexibility.
E.g. 'sqrt($_)' or whatever.

$formula = eval "sub{$formula}";

Of course you are still trusting that $formula will not contain any
malicious code.  If you don't want to make this assumption then use
Safe.

> Now I'm wondering how I could get the Result into a new $var.

I'd use an assignment statement.  Assignment statements are really
good at getting the reasult of an expresion into a variable.  (I can't
believe you just asked that).

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


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

Date: Fri, 11 Aug 2000 12:50:22 +0200
From: Dominik Leinfelder <domi@boulevards.de>
Subject: Re: calculating with getting a formula out of a $string
Message-Id: <3993DA6E.236BF0D4@boulevards.de>

Logan Shaw schrieb:
> 
> 
> Be careful, though.  eval will execute *any* perl code, so this could
> be a security risk is someone puts "system ('rm -rf /'), 1 + 1" in the
> database instead of "1 + 1".  If you have total control over the
> contents of the database, then that's great.  Otherwise, you need to
> either look at some alternate method or _very_ carefully clean up the
> expression before trying to execute it.

Thanks for this helpfull answer!
I did try $result = eval{$expression}; which of course didn't work..
a kind of, err, mistake...

thanks again!
¦)ominik


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

Date: Fri, 11 Aug 2000 12:31:53 GMT
From: "Herbert Moses" <herbmoses@worldnet.att.net>
Subject: CPAN problem
Message-Id: <ZmSk5.31126$RG6.2439604@bgtnsc05-news.ops.worldnet.att.net>



--

Hi,
Having trouble with CPAN. Trying to install ANYTHING and get the following:



Trying with "/usr/bin/lynx -source" to get
    ftp://carroll.cac.psu.edu/pub/CPAN/modules/03modlist.data.gz

gzip: yes/sources/modules/03modlist.data: not in gzip format
Going to read yes/sources/modules/03modlist.data.gz
Running make for G/GA/GAAS/Digest-MD5-2.09.tar.gz

  CPAN: MD5 security checks disabled because MD5 not installed.
  Please consider installing the MD5 module.

yes/sources/authors/id/G/GA/GAAS/Digest-MD5-2.09.tar.gz: No such file or
directory
Could not open >yes/build/G001/Makefile.PL at -e line 3274


Can anyone help?





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

Date: 11 Aug 2000 11:01:41 GMT
From: u8526505@ms27.hinet.net ()
Subject: create process on windows platform
Message-Id: <8n0mel$igj@netnews.hinet.net>

The fork function doesn't work on windows platform,at least on my computer.
Is there any other way to write multi-process code on windows?
I also tried the thread version of some samples and they all failed.
The message said no threads support but I think 5.6 should support thread.
I'm confused.

Derek


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

Date: Fri, 11 Aug 2000 11:29:37 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: create process on windows platform
Message-Id: <MPG.13fe810df50804749896a3@localhost>

u8526505@ms27.hinet.net wrote ..
>The fork function doesn't work on windows platform,at least on my computer.
>Is there any other way to write multi-process code on windows?
>I also tried the thread version of some samples and they all failed.
>The message said no threads support but I think 5.6 should support thread.
>I'm confused.

threading is still experimental and so IIRC ActiveState's binary Perl 
distributions do NOT have threading compiled in

you could try Win32::Process .. there's quite a large overhead to 
creating new processes so it might not be what you're looking for if 
you're looking to create a large number of processes .. but it's worth a 
look anyway

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


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

Date: Fri, 11 Aug 2000 06:16:02 -0600
From: Ron Reidy <rereidy@indra.com>
Subject: Re: DBD oracle install HELP! - LD [lnetv2] ??
Message-Id: <3993EE82.1E038598@indra.com>

btaneja@my-deja.com wrote:
> 
> I am trying to "make" DBD.. however it keeps bailing out
> as below...
> 
> I do not have any LD_LIBRARY_PATH setup.. could this be the problem..
> If so what should it be... ?? the LD_LIB_PATH is not mentioned in the
> install manual .. HELP??
> 
> thanks,
> Bruce, Chicago
> 
> Running Mkbootstrap for DBD::Oracle ()
>         chmod 644 Oracle.bs
>         LD_RUN_PATH="" ld -o blib/arch/auto/DBD/Oracle/Oracle.sl  -b -
> s -a shared Oracle.o  dbdimp.o  oci7.o  oci8.o -
> L/u01/oracle/product/8.0.6/lib/ -
> L/u01/oracle/product/8.0.6/rdbms/lib   -
> clntsh /u01/oracle/product/8.0.6/lib/nautab.o /u
> 01/oracle/product/8.0.6/lib/naeet.o /u01/oracle/product/8.0.6/lib/naect.
> o /u01/oracle/product/8.0.6/lib/naedhs.o
> `cat /u01/oracle/product/8.0.6/lib/naldflgs`  -lnetv2 -lnttcp -
> lnetwork -lncr  -lnetv2 -lnttcp -lnetwork -lclient -lvsn -lcommon -
> lgeneric -lmm -lnlsrtl3  -lcore4 -lnlsrtl3 -lcore4 -lnlsrtl3 -lnetv2 -
> lnttcp-lnetwork -lncr  -lnetv2 -lnttcp -lnetwork -lclient -lvsn -
> lcommon -lgeneric  -lepc -lnlsrtl3  -lcore4 -lnlsrtl3 -lcore4 -
> lnlsrtl3 -lclient -lvsn -lcommon -lgeneric -lnlsrtl3  -lcore4 -
> lnlsrtl3 -lcore4 -lnlsrtl3
> `cat /u01/oracle/product/8.0.6/lib/sysliblist`  -lm
> ld: Can't find library for -lnetv2
> *** Error exit code 1
> 
> Stop.
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Bruce,

You will need to have ORACLE_HOME, ORACLE_SID and LD_LIBRARY_PATH set to
correctly make DBD.  LD_LIBRARY_PATH should be set to $ORACLE_HOME/lib.
-- 

Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.


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

Date: 8 Aug 2000 22:14:45 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DBI: LAST_INSERT_ID() getting the value of
Message-Id: <8mpt85$16t$1@orpheus.gellyfish.com>

On Mon, 7 Aug 2000 23:15:27 +0100 Mark Worsdall wrote:
> Hi,
> 
> How can I return into my own variable the last auto inc id after an
> insert?
> 
> This doesn't work:-(
> 
> $sth = $dbh->prepare("SELECT LAST_INSERT_ID() FROM SearchPhrases");
> $sth->execute();
> $sth->finish();
> $phrases_id = $sth->fetchrow_array();

I would say that you probably want the last two lines there the other way
around.  You will also want :

  ($phrases_id) = $sth->fetchrow_array();

(Note the parentheses).

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


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

Date: Fri, 11 Aug 2000 14:34:00 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Digest MD5 of Perl
Message-Id: <8n0rqj$64p4@intranews.dresdnerbank.de>

    Hi,

rchan@echarge.com schrieb in Nachricht <8mvqej$nqd$1@nnrp1.deja.com>...
>The platform is WINNT.  The library is Active Perl 5.6.   I downloaded
>Cryptix MD5 and CPAN MD5.

    why not using the ActiveState package to be installed
    with the PPM? It's pretty easy (download the zip file,
    extract it to a temp dir, start up the ppm,
    'PPM>install /location <tempdir> Digest-MD5' will
    install it in a few seconds...).
    In http://www.activestate.com/PPMPackages/5.6/zips/
    you will find the module.

    Best regards,

        Peter Dintelmann





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

Date: 11 Aug 2000 07:06:42 GMT
From: maheshasolkar@engineer.com
Subject: Re: File handle and symbolic link
Message-Id: <8n08m2$1eq$1@news.netmar.com>

In a previous article,  Yidao Cai  <yidao.cai@uth.tmc.edu> writes:
>1. File handle
>
>Suppose in Sub1, we open "fileA" with
>
>open(FIN, "<$filename);
>
>where $filename = "fileA".
>
>Now we call Sub2, and Sub2 call Sub1 and use the same open() line, only
>that $filename = "fileB". Now the since FIN is associated with "fileB"
>and we have no way to access "fileA" again.
>
>Is there a my() equivelent for file handles?
>

There is no my() or local() for file descriptors. When you write a function
to
realize some file operation, you have to pass the file name itself. Open the
file
inside the function &
manipulate the dile data.

But in the Perl v5.6.0, there has been a breakthrough. Perl 5.6.0 has started
treating file descriptors as real variables (e.g. $FIN). This way, you can
pass a
file descriptor to a
subroutine.

So if you have  to pass file handles to your subroutine, download Perl
v5.6.0.

>2. Symbolic link
>
>SymLink is soft-link to "realDir".
>
>-f SymLink   returns true
>-f SymLink/   returns false
>
>Why is this? 
>

I don't have an idea about this. But it happens on the unix prompt aswell.

ls -al SymLink # shows just the link ..... SymLink -> realDir
ls -al SymLink/ # actually lists realDir

>
>cai
>-- 
>email: yidao.cai@uth.tmc.edu


     -----  Posted via NewsOne.Net: Free Usenet News via the Web  -----
     -----  http://newsone.net/ --  Discussions on every subject. -----
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: Fri, 11 Aug 2000 07:37:38 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: File handle and symbolic link
Message-Id: <MPG.13fe4aa795b5041498969c@localhost>

maheshasolkar@engineer.com wrote ..
>In a previous article,  Yidao Cai  <yidao.cai@uth.tmc.edu> writes:
>>1. File handle
>>
>>Suppose in Sub1, we open "fileA" with
>>
>>open(FIN, "<$filename);
>>
>>where $filename = "fileA".
>>
>>Now we call Sub2, and Sub2 call Sub1 and use the same open() line, only
>>that $filename = "fileB". Now the since FIN is associated with "fileB"
>>and we have no way to access "fileA" again.
>>
>>Is there a my() equivelent for file handles?
>>
>
>There is no my() or local() for file descriptors. When you write a
>function to realize some file operation, you have to pass the file name
>itself. Open the file inside the function & manipulate the dile data.

certainly you can't directly 'my' or 'local'ise a file descriptor .. but 
you can 'local'ise the typeglob for a filedescriptor which makes the 
second and third sentence above incorrect

with no thought given to data encapsulation or other such things - 
here's an example

#!/usr/bin/perl -w
use strict;

openFileForFIN( 'someFile');

print <FIN>;  # prints the first line from 'someFile'

# do things with $line

sub2();

print <FIN>;  # prints the second line from 'someFile'

sub openFileForFIN
{
  open FIN, "<$_[0]" or die qq[Bad open of "$_[0]": $!];
}

sub sub2
{
  local *FIN;  # localise the typeglob

  openFileForFIN( 'someOtherFile');  # this will now use the local FIN

  print <FIN>;  # prints the first line from 'someOtherFile'

  close FIN;

}  # on exit FIN is restored to its original value

__END__

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


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

Date: Fri, 11 Aug 2000 07:56:21 -0400
From: James Stephen Roberts <jsr@lucent.com>
Subject: FileField Problem
Message-Id: <3993E9E5.362097CC@lucent.com>

I am writing a Perl/CGI code that should allow a user to input a filename and
directory into a field and then the program should be able to retrieve this path
and store it as a scalar value. When I use $path_name = $q->param('filefield')
it returns a file handle. I just want the file path and name. If anyone can
offer any help on this please let me know. Also, if you need some of the code
just let me know and I will post it. Thanks.

Steve Roberts


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

Date: Fri, 11 Aug 2000 11:13:44 +0100
From: "Stuart Moore" <stumo@bigfoot.com>
Subject: Re: Forbidden You don't have permission to access /cgi-bin/query.cgi on this server.
Message-Id: <8n0k5f$njv$1@supernews.com>

<(( <yamar420@my-deja.com> wrote in message
news:8mvlu0$kjc$1@nnrp1.deja.com...
> Hello, I am using a Sun Ultra 5 running Solaris 2.6 with Apache 1.3.9.
> When I try to run a cgi script I get teh following error.
>
> Forbidden You don't have permission to access /cgi-bin/query.cgi on
> this server.
>
> Can anyone help me with this ? I belive I have all the correct mods
> loaded and am attempting to use a cgi-script with perl to access mySQL
> database. IS there some kind of permissioning issue ? I just setup a
> redhat apache server and cgi works fine..Thanks for any help. Yamar
>
My bet is you need to set the permissions so that the web server can execute
it -

chmod 755 query.cgi

should do it, but as others have said this isn't a perl problem.




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

Date: Fri, 11 Aug 2000 14:37:28 +0200
From: marvin <alesr@siol.net>
Subject: Re: Forbidden You don't have permission to access /cgi-bin/query.cgi on this server.
Message-Id: <3993F388.76E5@siol.net>

wrote:
> 
> Hello, I am using a Sun Ultra 5 running Solaris 2.6 with Apache 1.3.9.
> When I try to run a cgi script I get teh following error.
> 
> Forbidden You don't have permission to access /cgi-bin/query.cgi on
> this server.
> 
> Can anyone help me with this ? I belive I have all the correct mods
> loaded and am attempting to use a cgi-script with perl to access mySQL
> database. IS there some kind of permissioning issue ? I just setup a
> redhat apache server and cgi works fine..Thanks for any help. Yamar
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.
check apache security file called access.conf
<apache main directory>/etc/*.conf
There is also an alias name, to where /cgi-bin points. Notice, that
/cgi-bin doesn't mean that it resides at the main ROOT directory.


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

Date: Fri, 11 Aug 2000 20:00:18 +0800
From: "Kimochi3D" <jtalbain@nospam.kimochi3d.com>
Subject: Re: form replies in HTML
Message-Id: <8n0pf4$rto$1@clematis.singnet.com.sg>

Ahh! Thank you very much. And the other friends who emailed me directly.
Thank you very much!

Regards,
~Alvin




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

Date: Fri, 11 Aug 2000 04:50:18 GMT
From: "Kermit" <as@if.com>
Subject: Re: Get the Time
Message-Id: <eCLk5.124105$1h3.2048351@news20.bellglobal.com>

Sorry...   Ribbit.

Tom Wrote:
FYI, I'm sure the newsgroup would appreciate question-type postings, rather
than (simple) arbitrary code snippets.





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

Date: Thu, 10 Aug 2000 23:24:06 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: GREP - type of script...
Message-Id: <MPG.13fd3bdbf332a62298ac63@nntp.hpl.hp.com>

In article <MPG.13fdfc03cb351cb9989697@localhost>, 
elephant@squirrelgroup.com says...
> Larry Rosler wrote ..

 ...

> > ...  Here is an excerpt from perlrun:
> >
> >-i[extension]
> >
> >...
> >
> >If no extension is supplied, no backup is made and the current file is 
> >overwritten.
> 
> Bart's correct for Win32 .. in Win32 you can't supply no argument to -i 
> (at least in 5.005_03) .. you get an error
> 
>   Can't do inplace edit without backup.
> 
> this error is explained in perldiag

The behavior (which is the same in 5.6.0) should be documented in 
perlrun, where I quoted from.  This is a documentation bug.

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


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

Date: 11 Aug 2000 14:04:33 +0100
From: brianr@liffe.com
Subject: Re: Help with PPM
Message-Id: <vt4s4seyou.fsf@liffe.com>

Stephan Gross <sg@loralskynet.com> writes:

> I'm running the latest version of Activestate Perl (616) on Windows NT
> 4.0.  PPM is driving me crazy.  After some proxy setup problems, it
> appears to be working - somewhat.  It does do installs if I know the
> name of the package.  However, if I do a "search gui" (for example), I
> get back this:
> no element found at line 1874, column 5, byte 110532 at
> C:/site/lib/SOAP/Parser.pm at line 73
> and then I'm thrown out of PPM and back to a DOS prompt.  If I do a
> "verify", it verifies three packages and then the same thing occurs.
> Can someone tell me what's going on?

I have had this problem myself and with a bit of debugging have
discovered the following.

PPM uses LWP to send a request for information to the SOAP server (the
default being at activestate), and that responds with a bunch of
XML. The LWP response seems O.K. (code 200) but the content seems to
have been truncated. XML::Parser therefore craps out with an error
message like the one you provided.

I would normally suggest that activestat's bug tracking system, or
mailing lists would be a better place to ask about this, but I have
seen numerous reports on both, going back to May. I have yet to see
any feedback from activestate.

Sorry I couldn't be more help.

-- 
Brian Raven
Boss:   You forgot to assign the result of your map!
Hacker: Dang, I'm always forgetting my assignations...
Boss:   And what's that "goto" doing there?!?
Hacker: Er, I guess my finger slipped when I was typing "getservbyport"...


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

Date: 11 Aug 2000 06:55:36 GMT
From: sth@ms1.hinet.net ()
Subject: How to know if a scalar contain string or numeric data?
Message-Id: <8n0818$pk8@netnews.hinet.net>

Hello, all:
    We all know that a scalar variable is capable of storing either an
string or an numeric number. My question is how I can know if a scalar
variable is now containing a string or a number?

Regards,
Aaron



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

Date: Fri, 11 Aug 2000 07:41:29 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: How to know if a scalar contain string or numeric data?
Message-Id: <MPG.13fe4b8e15f2a66798969d@localhost>

sth@ms1.hinet.net wrote ..
>    We all know that a scalar variable is capable of storing either an
>string or an numeric number. My question is how I can know if a scalar
>variable is now containing a string or a number?

  perldoc perlfaq4

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

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


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

Date: 11 Aug 2000 09:09:32 GMT
From: "Mahesh Asolkar" <maheshasolkar@engineer.com>
Subject: Re: How to know if a scalar contain string or numeric data?
Message-Id: <8n0fsc$3ud$1@news.netmar.com>

Hi,

Parse the scalar for a number you desire...

e.g., for a pure integer ...

% perl -e '$No = "123";print "No is $No\n" if ($No =~ /^\d+$/)'
% No is 123

 .. & for a float with a decimal "." (Not a very complete parsing, you'll need
to elaborate)

% perl -e '$No = "12.3";print "No is $No\n" if ($No =~ /^\d+\.?\d*$/)'
% No is 12.3

-Mahesh

In a previous article,  < sth@ms1.hinet.net ()> writes:
>Hello, all:
>    We all know that a scalar variable is capable of storing either an
>string or an numeric number. My question is how I can know if a scalar
>variable is now containing a string or a number?
>
>Regards,
>Aaron
>


     -----  Posted via NewsOne.Net: Free Usenet News via the Web  -----
     -----  http://newsone.net/ --  Discussions on every subject. -----
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: 11 Aug 2000 12:47:40 +0100
From: nobull@mail.com
Subject: Re: How to know if a scalar contain string or numeric data?
Message-Id: <u9zomkuihv.fsf@wcl-l.bham.ac.uk>

jason <elephant@squirrelgroup.com> writes:

> sth@ms1.hinet.net wrote ..
> >    We all know that a scalar variable is capable of storing either an
> >string or an numeric number. My question is how I can know if a scalar
> >variable is now containing a string or a number?

Why do you think you need to know?  You may need to force a scalar
into one form or the other but you (almost) never need to find out
what form it is currently in.
 
$a .= ''; # $a now holds a string
$a += 0;  # $a now holds a number

>   perldoc perlfaq4
> 
>   "How do I determine whether a scalar is a number/whole/integer/float?"

Unfortunately, although this appears to be the same question it is
not.

$a="1"; # $a now holds a string
$a=1;   # $a now holds an integer
$a=1.1  # $a now holds a float

In all cases the perlfaq4 solution will tell you that $a a number.

If you really want to know:

sub is_number ($) { ( $_[0] ^ $_[0] ) eq '0' }

See also previous threads asking this same question.

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


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

Date: 11 Aug 2000 12:02:00 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to know if a scalar contain string or numeric data?
Message-Id: <8n0pvo$8fk$1@lublin.zrz.tu-berlin.de>

jason  <elephant@squirrelgroup.com> wrote in comp.lang.perl.misc:
>sth@ms1.hinet.net wrote ..
>>    We all know that a scalar variable is capable of storing either an
>>string or an numeric number. My question is how I can know if a scalar
>>variable is now containing a string or a number?
>
>  perldoc perlfaq4
>
>  "How do I determine whether a scalar is a number/whole/integer/float?"

I'm not entirely sure if that is what the OP meant.  Even in Perl it 
occasionally makes a difference whether you say $x = 123; or $x = '123';
None of the regular expressions in the faq can tell these cases apart,
but
    ~$x ne ~"$x" ? 'numeric' : 'string'
can.

Anno


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

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


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