[11234] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4834 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 5 16:07:24 1999

Date: Fri, 5 Feb 99 13:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 5 Feb 1999     Volume: 8 Number: 4834

Today's topics:
    Re: Backslash Chars Eaten by "print" <ebohlman@netcom.com>
    Re: Browser hangs using CGI.pm droby@copyright.com
    Re: how to query errno.h info <jglascoe@giss.nasa.gov>
    Re: Is perl a freeware? dhosek@webley.com
    Re: Is perl a freeware? <camerond@mail.uca.edu>
        Mod_Perl/Apache compile problem <ed@pcr8.pcr.com>
    Re: Perl 4.0.1.7 Y2K compliancy <ludlow@us.ibm.com>
        Perl Includes? <wildcard3927@hotmail.com>
        Perl Includes? <cdlawson@xnet.com>
        perl not always in /usr/bin/perl <diercks@astro.washington.edu>
    Re: perl not always in /usr/bin/perl <dgris@moiraine.dimensional.com>
    Re: perl not always in /usr/bin/perl <jglascoe@giss.nasa.gov>
        Perl5.005002 Broken on number passing? <xeno@bigger.aa.net>
    Re: Perl5.005002 Broken on number passing? (Larry Rosler)
    Re: problem forking with perl: child sometimes dies (Charles DeRykus)
        seg faults (Esa Tikka)
    Re: sending an attached file with Sendmail? jcg@teleport.com
    Re: Sending Perl output to 2 diffent html frames <bob@worldparts.com>
    Re: Sending Perl output to 2 diffent html frames <jmc1@gte.com>
        setgid <einar.gudmundsson@realtime.co.uk>
        Simple Question About a Scalar (Pete Holsberg)
    Re: Simple Question About a Scalar <jglascoe@giss.nasa.gov>
    Re: Simple Question About a Scalar (Larry Rosler)
    Re: storage/retrieval of text databases chad@vcn.net
        Swap Space & Child Processes <ralph@inlink.com>
    Re: Syntax checking without "perl -c"? <sternji@mail.northgrum.com>
        test of autobot (Autobot fodder)
    Re: trouble invoking script from shell prompt <spike_YYwhiteYY@YYdellYY.com>
    Re: trouble invoking script from shell prompt <ag1@altavista.net>
    Re: trouble invoking script from shell prompt <ag1@altavista.net>
        Unable to Delete, undef <user@home.com>
        Unblessed reference error when using DBI::DBD <blavender@spk.usace.army.mil>
    Re: Unblessed reference error when using DBI::DBD <ebohlman@netcom.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 5 Feb 1999 20:30:47 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Backslash Chars Eaten by "print"
Message-Id: <ebohlmanF6p7nB.4sK@netcom.com>

Derek Mark Edding <drek@nina.pagesz.net> wrote:
: I tried reading each line from the file, then doing a substi-
: tution like

:    s#\{\\bf #\{\\b #g

: but when I look at the file, all that's getting written is
: "{b ", the backslash is being eaten.  I can substitute any
: other special character, but when I try backslash it gets
: removed!

Try showing us *exactly* what you wrote, not something "like" what you 
wrote.  The interpretation of backslashes is very sensitive to things 
like quoting and string interpolation.



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

Date: Fri, 05 Feb 1999 19:25:50 GMT
From: droby@copyright.com
Subject: Re: Browser hangs using CGI.pm
Message-Id: <79fgjh$a8s$1@nnrp1.dejanews.com>

In article <79dvnr$1d0$1@nnrp1.dejanews.com>,
  chad@vcn.net wrote:
> In article <79dbju$l6s$1@remarQ.com>,
>   "Aaron Newcomb" <aaron_newcomb@inter-tel.com> wrote:
> > I am trying to learn how to use CGI.pm. One problem I haven't been able to
> > solve is when I run a script that uses external information (whether I use a
> > form to post the info or even use "open (STDIN,"filename";)") and try to
> > manipulate the info my browser hangs. I am running Active Perl for Win32 on
> > IIS 4.0. The script runs fine from the command prompt and outputs exactly
> > what I would expect. For example, I can't run Lincoln Stein's own
> > http://www.wiley.com/compbooks/stein/text/htmlize.txt when I type out the
> > script and run it from the browser! Any suggestions would be great. In the
> > meantime, I am going to try running it on Apache to see if it is a server
> > issue.
>
> Try to see if CGI_Lite.pm will do what you need.  I have used it in many
> (100's) of cgi scripts with no pronlems.  I know that doesn't anwser
> questions about CGI.pm, I've never used it, maybe I'm missing out.
>

Maybe you are.  I haven't used CGI_Lite.pm, so I can't really say.

But Lincoln Stein's script certainly works, so this is a server issue or a
server config issue or a file location or permissions issue.

This particular script is a demo of displaying text from an input file in a
table format.  It unfortunately has the filename for the input hard-coded as
"./table.txt", and doesn't test for success/failure of the open (Bad Lincoln,
slap slap...;-)).  A reasonably likely error is that the file simply isn't in
the place the script expects it.

Probably in NT you want to fully specify the path instead of using the "./".
(I haven't done web stuff on NT servers, so I don't know what "./" is likely
to translate to.)

And probably in another lesson he explains how to test the success of the open
and send error messages to the browser.  I'm sure he knows how.  ;-)

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 05 Feb 1999 15:27:57 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: how to query errno.h info
Message-Id: <36BB544D.F13A5C29@giss.nasa.gov>

Brad Baxter wrote:
> 
> use Fcntl;

yes.  Another choice is

use IO::File;

--
ping.


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

Date: Fri, 05 Feb 1999 20:07:13 GMT
From: dhosek@webley.com
Subject: Re: Is perl a freeware?
Message-Id: <79fj19$ch1$1@nnrp1.dejanews.com>

In article <79eumn$pu1$1@nnrp1.dejanews.com>,
  droby@copyright.com wrote:
> I had an Atari-800 8bit computer in the early 80s.  Would have been nice to
> have that Perl cartridge then.	The BASIC wasn't quite as horrible as
what
> you describe, but it was pretty limited.  You could put machine code in
> strings and call them though.  That was fun.

Yah, but that was the computer. I'm talking about the 2600 game console. I
believe that the Atari 400 (am I remembering these numbers correctly?)
computer was built off of a similar architecture, but had actual useful RAM
which was the big problem with the 2600 basic cartridge. It still could have
been better than it was though.

-dh


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 05 Feb 1999 14:28:59 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
To: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Is perl a freeware?
Message-Id: <36BB548B.88D4D27C@mail.uca.edu>

[cc'd to aq]

Ala Qumsieh wrote:
> 
> In addition, the latest issue of TPJ shows a Perl Atari cartridge. I
> always thought Perl was entertaining, but I don't suppose it's easy to
> write any useful code with a joystick!
> 
> PS. The "adventure" game displayed was one of my favourites as a
> kid. Anyone still has it?

Yep, I've got it. Always thought the neatest thing about it was the
occasional ability to get your player through walls. And wasn't there
some trick thingy, like the "Easter eggs" put into programs nowadays? 

But, I always liked the "Millipede" cartridge better, lots of action.

Cameron
camerond@mail.uca.edu


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

Date: Fri, 05 Feb 1999 13:26:17 -0500
From: Ed Eddington <ed@pcr8.pcr.com>
Subject: Mod_Perl/Apache compile problem
Message-Id: <36BB37C9.33F2684B@pcr8.pcr.com>

While "make"ing mod_perl for Apache, I am getting compile errors during
the "/src/modules/perl" portion of the compile. Apache builds OK on it's
own. Also, Mod_Perl 'make' succeeds when I don't include all the
modules. I am installing this Apache for testing in a home directory
while NOT root user.

Here is my configuration:
     Apache 1.3.4, Mod_perl 1.1.7
     CC for AIX 4.2
     Perl 5.004.01 
     (FYI: I got the same error on another system running Perl 5.004.64
on AIX 4.1.4.)

When I try this:

perl Makefile.PL \
         APACHE_PREFIX=/home/ed/newapache \
         APACHE_SRC=../apache_1.3.4/src \
         DO_HTTPD=1 \
         USE_APACI=1 \
         EVERYTHING=1 \
         APACI_ARGS=' --enable-shared=perl --enable-module=most \
         --enable-shared=max'

I get a couple warnings about upgrading this Perl (plus it doesn't have
LWP installed, but that it is only required to run 'make test'.)

Then I run 'make' and get the following error:
----------------------------------------------------------------------
===> src/modules/perl
(...)

        cc  -O -qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE
-D_POSIX_SOURCE -I/usr/local/include
-I/usr/local/lib/perl5/aix/5.00401/CORE   -DMOD_PERL_VERSION=\"1.17\"
-DMOD_PERL_STRING_VERSION=\"mod_perl/1.17\"  -I../../os/unix
-I../../include   -DAIX=42 -U__STR__ -DAIX_BIND_PROCESSOR -qnogenpcomp
-qnousepcomp -DMOD_PERL -DUSE_HSREGEX `../../apaci` -c Table.c && mv
Table.o Table.lo
"Table.xs", line 226.33: 1506-280 (W) Function argument assignment
between types "void(*)(struct table*,const unsigned char*,const unsigned
char*)" and "void*" is not allowed.
"Table.xs", line 235.33: 1506-280 (W) Function argument assignment
between types "void(*)(struct table*,const unsigned char*,const unsigned
char*)" and "void*" is not allowed.
        rm -f libperl.so
        ld -H512 -T512 -bhalt:4 -bM:SRE
-bI:-I/usr/local/lib/perl5/aix/5.00401/CORE /perl.exp -bE:.exp -b
noentry -lc -L/usr/local/lib -o libperl.so mod_perl.lo perlxsi.lo
perl_config.lo perl_util.lo perlio.lo mod_perl_opmask.lo  Apache.lo
Constants.lo ModuleConfig.lo Log.lo URI.lo Util.lo Connection.lo
Server.lo File.lo Table.lo
-bE:/usr/local/lib/perl5/aix/5.00401/CORE/perl.exp  -L/usr/local/lib
/usr/local/lib/perl5/aix/5.00401/auto/DynaLoader/DynaLoader.a
-L/usr/local/lib/perl5/aix/5.00401/CORE -lperl -lnsl -ldbm -ldl -lld -lm
-lc -lbsd -lPW 
ld: 0706-005 Cannot find or open file: /perl.exp
        ld:open(): A file or directory in the path name does not exist.
ld: 0706-003 Cannot find or read import file:
-I/usr/local/lib/perl5/aix/5.00401/CORE
        ld:accessx(): A file or directory in the path name does not
exist.
ld: 0706-004 Cannot find or read export file: .exp
        ld:accessx(): A file or directory in the path name does not
exist.
make: 1254-004 The error code from the last command is 255.
----------------------------------------------------------------------

This appears to have 2 seperate errors, "Function argument assignment
between types ... is not allowed" and then "ld: Can't find or open file:
/perl.exp". Running 'make' again immediately produces only the latter
error.

The file /usr/local/lib/perl5/aix/5.00401/CORE/perl.exp DOES exist and
is read-only and owned by root.

Any thoughts on what is causing this? Is Perl improperly installed on
both of these systems? Must I install mod_perl as root? Any ideas on
what I can try?

Thank you!
Ed Eddington

PS:
I once got this error (different but related?) on the other system:

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

     ===> src/main
             cc -c  -I../os/unix -I../include   -DAIX=41 -DNEED_RLIM_T
-U__STR__ -     qnogenpcomp -qnousepcomp -DAIX_BIND_PROCESSOR -DMOD_PERL
-     DUSE_HSREGEX `../apaci` gen_test_char.c
             cc  -DAIX=41 -DNEED_RLIM_T -U__STR__ -qnogenpcomp
-qnousepcomp -     DAIX_BIND_PROCESSOR -DMOD_PERL -DUSE_HSREGEX
`../apaci`   -o      gen_test_char gen_test_char.o 
-bE:/usr/local/lib/perl5/aix/5.00464/CORE/perl.exp  -    
L/usr/local/lib
/usr/local/lib/perl5/aix/5.00464/auto/DynaLoader/DynaLoader.a -    
L/usr/local/lib/perl5/aix/5.00464/CORE -lperl -ldbm -lld -lm -lc -lbsd
-lPW 
     ld: 0711-319 WARNING: Exported symbol not defined: Mycalloc
     ld: 0711-319 WARNING: Exported symbol not defined: Myfree
     ld: 0711-319 WARNING: Exported symbol not defined: Mymalloc
     ld: 0711-319 WARNING: Exported symbol not defined: Myremalloc
     ld: 0711-319 WARNING: Exported symbol not defined: Perl_abs_amg
     ...(many similar)...
------------------------------------------------------------------------
FYI: These symbols are all found in the file in the error above
/usr/local/lib/perl5/aix/5.00464/CORE/perl.exp


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

Date: Fri, 05 Feb 1999 12:18:06 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Perl 4.0.1.7 Y2K compliancy
Message-Id: <36BB35DE.A4A44978@us.ibm.com>

thedesert1@aol.com wrote:

> Does anyone know if Perl 4.0.1.7 is Y2K compliant.

This is a FAQ, and it gets asked a lot too.
http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html#Does_Perl_have_a_year_20_probl

The bigger question is, why are you still using Perl 4?  If you found
out that Perl 4 wasn't y2k compliant, would you then upgrade to Perl 5? 
Why not just upgrade anyway?

-- 
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)


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

Date: 5 Feb 1999 20:41:44 GMT
From: Chad Lawson <wildcard3927@hotmail.com>
Subject: Perl Includes?
Message-Id: <79fl28$j67$1@flood.xnet.com>

I am trying to write a generic CGI engine that will load (include) 
functions from other perl scripts.

According to the documentation, I should be able to have other simple
perl functions withing the @INC path, and say:

	use code;

And if code.pm contains "sub ReadData", I should be able to call:
	
	&ReadData;

But I keep getting:
	Undefined subroutine &main::AddressBook called at ./index.cgi line 29.

I have a routine in the main code to 'use' each file in a "Mod" directory,
and I want to be able to call functions without having to know what 
included file they are in.

My CGI gets the name of the function it should call from the QUERY_STRING.

How can I have extra snipits of perl code that are included into the main
script at runtime, and are considered part of the main file?

I don't even know how to ask the question simply to look in a FAQ or search
online documentation.  Can anyone point me to a source, or tell me what to do?

Thanks in advance,
CDL


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

Date: 5 Feb 1999 20:46:35 GMT
From: Chad Lawson <cdlawson@xnet.com>
Subject: Perl Includes?
Message-Id: <79flbb$j6o$1@flood.xnet.com>

I am trying to write a generic CGI engine that will load (include) 
functions from other perl scripts.

According to the documentation, I should be able to have other simple
perl functions withing the @INC path, and say:

	use code;

And if code.pm contains "sub ReadData", I should be able to call:
	
	&ReadData;

But I keep getting:
	Undefined subroutine &main::AddressBook called at ./index.cgi line 29.

I have a routine in the main code to 'use' each file in a "Mod" directory,
and I want to be able to call functions without having to know what 
included file they are in.

My CGI gets the name of the function it should call from the QUERY_STRING.

How can I have extra snipits of perl code that are included into the main
script at runtime, and are considered part of the main file?

I don't even know how to ask the question simply to look in a FAQ or search
online documentation.  Can anyone point me to a source, or tell me what to do?

Thanks in advance,
CDL

"He deals the cards as a mediation...the sacred geometry of chance,
the hidden law of a probable outcome, the numbers lead a dance."
--Sting, "Shape of My Heart"


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

Date: Fri, 05 Feb 1999 11:53:31 -0800
From: Alan Diercks <diercks@astro.washington.edu>
Subject: perl not always in /usr/bin/perl
Message-Id: <36BB4C3A.6D46D72@astro.washington.edu>

I have been been distributing a group of Perl scripts I have written to
various
Unix machines where the perl executable is not in /usr/bin/perl and
I don't
have permissionto make a soft link to its actual location.

Is there a clever way to avoid having to edit all of my scripts to fix
the
  #!/usr/bin/perl
line at the top for each new installation?

Thanks.

-Alan

diercks@nospam.astro.washington.edu





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

Date: 05 Feb 1999 13:30:11 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: perl not always in /usr/bin/perl
Message-Id: <m390eczj8s.fsf@moiraine.dimensional.com>

Alan Diercks <diercks@astro.washington.edu> writes:

> Is there a clever way to avoid having to edit all of my scripts to
> fix the 
>  #!/usr/bin/perl 
> line at the top for each new installation?

Look at how the *.PL files in the utils/ directory of the source
distribution do it.  Essentially, you deliver an installation script
that figures out the system dependent information and then extracts
the real script from itself.

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Fri, 05 Feb 1999 15:18:00 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Alan Diercks <diercks@astro.washington.edu>
Subject: Re: perl not always in /usr/bin/perl
Message-Id: <36BB51F8.42B749F4@giss.nasa.gov>

Alan Diercks wrote:
> 
> Is there a clever way to avoid having to edit all of my scripts to fix
> the
>   #!/usr/bin/perl
> line at the top for each new installation?

try

#! /usr/bin/env perl

as long as perl is somewhere in the luser's path,
this will find it.

	Jay
--
supercalafragilisticexpialidocious


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

Date: 5 Feb 1999 19:21:13 GMT
From: Xeno Campanoli <xeno@bigger.aa.net>
Subject: Perl5.005002 Broken on number passing?
Message-Id: <79fgb9$t1q$1@slave1.aa.net>

I've got the following:

$n = 005.5;

I then print

print STDERR "trace $n\n";

I get back:

trace 55

You can't tell me that this isn't broken.  Larry, you've gotta fix this
fast!!  Sincerely, Xeno

P.S., a quick fix is $n = "005.5" instead.


-- 
Xeno Campanoli
Email:	xeno@aa.net	(Web pages:  http://www.aa.net/~xeno)


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

Date: Fri, 5 Feb 1999 12:08:03 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl5.005002 Broken on number passing?
Message-Id: <MPG.1124ef82ed4d49af989a0c@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <79fgb9$t1q$1@slave1.aa.net> on 5 Feb 1999 19:21:13 GMT, Xeno 
Campanoli <xeno@bigger.aa.net> says...
> I've got the following:
> 
> $n = 005.5;
> 
> I then print
> 
> print STDERR "trace $n\n";
> 
> I get back:
> 
> trace 55
> 
> You can't tell me that this isn't broken.  Larry, you've gotta fix this
> fast!!  Sincerely, Xeno
> 
> P.S., a quick fix is $n = "005.5" instead.

Let (Just Another Larry) tell you that this isn't broken!  '005.5' isn't 
a valid floating-point number, as you assume.  It is being parsed as the 
concatenation of two numeric literals converted to strings:

  ('005' becomes (octal) 5 becomes '5') . (5 becomes '5')

This is not a 5.005_02 problem, as your Subject suggests.  I have 
confirmed this behavior as far bask as 5.002.

The closest I can find documenting it is in perldata:

<QUOTE>
Scalar value constructors

Numeric literals are specified in any of the customary floating point or 
integer formats: 

    12345
    12345.67
    .23E-10
    0xffff              # hex
    0377                # octal
    4_294_967_296       # underline for legibility

String literals are usually delimited by either single or double quotes. 
 ...

Octal or hex representations in string literals (e.g. '0xffff') are not 
automatically converted to their integer representation. ...
</QUOTE>

Your '005.5' is a string literal, and is simply converted to a floating-
point value by C atof(); 005.5 is, as I said, a concatenation of two 
numeric literals.

But the whole thing certainly deserves a hearty "Gotcha!"  Maybe a 
warning would be appropriate.  :-)
 
-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Fri, 5 Feb 1999 19:42:23 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: problem forking with perl: child sometimes dies
Message-Id: <F6p5En.Fpr@news.boeing.com>

In article <79aj29$57g$1@nnrp1.dejanews.com>,  <k2k2@my-dejanews.com> wrote:
>
>    if (!defined($child_pid = fork())) {
>       die "cannot fork $!\n";
>    } elsif ($child_pid) {  #parent process
>       print "this is the parent";
>    } else {                #child process
>       open STDERR, ">/dev/null";   #must close STDERR & STDOUT or the
>       open STDOUT, ">/dev/null";   #  process will wait for the fork
>                                    #  before finishing if run via CGI.
>       ...    
>    }

You might try daemonizing with POSIX C<setsid>, i.e.

use POSIX 'setsid';

} else  {       # child process 
   local $SIG{HUP} = local $SIG{PIPE} = 'IGNORE';
   open STDIN, "</dev/null" or die "can't read /dev/null: $!"; 
   open STDOUT,">/dev/null" or die "can't write to /dev/null: $!"; 
   setsid()  or die "can't start new session: $!"; 
   open STDERR,">&STDOUT" or die "can't dup stdout: $!";
   open LOG...
   flock...
}


hth,
--
Charles DeRykus


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

Date: 5 Feb 1999 19:41:35 GMT
From: etikka@kuha.cc.lut.fi (Esa Tikka)
Subject: seg faults
Message-Id: <slrn7bmibf.cn1.etikka@kuha.cc.lut.fi>

Hi!

I was wondering if perl has some troubles with certain libc5 versions. I
didn't need perl for a couple of months and now it just dumps core,
nothing else (this with perl-5.003-8 which came with my RH4.2).
Then I tried to compile perl-5.005_02, no use. During make it complains
something like

 make[1]: Entering directory `/usr/local/src/perl5.005_02/ext/DynaLoader'
 Makefile out-of-date with respect to ../../lib/Config.pm ../../config.h
 Cleaning current config before rebuilding Makefile...
 make -f Makefile.old clean > /dev/null 2>&1 || /bin/sh -c true
 ../../miniperl "-I../../lib" "-I../../lib" Makefile.PL "INSTALLDIRS=perl"
 "LIBP$Writing Makefile for DynaLoader
 ==> Your Makefile has been rebuilt. <==
 ==> Please rerun the make command.  <==
 false
 make[1]: *** [Makefile] Error 1
 make[1]: Leaving directory `/usr/local/src/perl5.005_02/ext/DynaLoader'

but still goes on. (I don't know if it's normal behaviour, though)
When I do make test 30 of tests fail. Again, seg fault.

I have installed/upgraded at least to the following versions as rpms

 libc.so.5.4.38
 binutils-2.8.1.0.1-1
 gtk+-1.0.6-1  (well hardly perl cares about these?)
 glib-1.0.6-1

I could try downgrading back but it would mean a lot uninstalling packets
which need these versions, so I'm not very excited about that option.
I appreciate any help, and if there's something more you want to know I'll
happily go dig it for you.

-- 
Esa Tikka          ---  esa dot tikka at lut dot fi  ---
LTKK/ti2      ---> .satan, oscillate my metallic sonataS  <---
Support the anti-spam amendment. Join the fight http://www.cauce.org/


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

Date: Fri, 05 Feb 1999 18:40:20 GMT
From: jcg@teleport.com
Subject: Re: sending an attached file with Sendmail?
Message-Id: <79fdui$7uv$1@nnrp1.dejanews.com>

In article <79cq9v$jls$7@news0-alterdial.uu.net>,
  gward@cnri.reston.va.us (Greg Ward) wrote:
> Artoo <r2-d2@REMOVEbigfoot.com> wrote:
> > How can you send an attached file (text file) with sendmail and Perl?
>
> I've never used them, but there is a module distribution on CPAN called
> MIME-tools.  Betcha they contain something to build MIME messages (but I
> don't promise anything!).

Yes they do.  Use the Mime::Entity module in MIME-tools.

Joel

>         Greg
> --
> Greg Ward - software developer                    gward@cnri.reston.va.us
> Corporation for National Research Initiatives
> 1895 Preston White Drive                      voice: +1-703-620-8990 x287
> Reston, Virginia, USA  20191-5434               fax: +1-703-620-0913
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 5 Feb 1999 18:15:00 GMT
From: "Bob Van Der Ploeg" <bob@worldparts.com>
Subject: Re: Sending Perl output to 2 diffent html frames
Message-Id: <79fcf4$8ur$1@comet3.magicnet.net>


>
>That's not Java, it's Javascript.  The differences are legion.  Do not,
>repeat, do NOT conflate the two, or people who aren't as nice as me will
>give you far more crap about it than I'm doing.


your right.... I knew that...sorry my bad...

>Aside from the "print" statements, this isn't perl.  Why are you
>discussing this on a perl newsgroup?
>

I thought it could be done with perl....

Oh well.. at least you guys/gals help me solve my problem... Thanks





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

Date: Fri, 05 Feb 1999 14:00:45 -0500
From: John Chambers <jmc1@gte.com>
Subject: Re: Sending Perl output to 2 diffent html frames
Message-Id: <36BB3FDD.610732A6@gte.com>

dturley@pobox.com wrote:
> 
> > Bob Van Der Ploeg wrote:
> > >
> > > How do I get perl to send output to 2 different html frames?
> >
> >
> 
> If you *REALLY* must do this, just have your script send the whole frameset
> and redraw the complete set. I have a simple demo of this at:
> 
> http://www.binary.net/dturley/cgi-local/frames.cgi

I checked it out, and just as I suspected, it isn't actually
a CGI script that sends data to multiple frames. Rather, it's
a script that sends a frameset and then exits.  The frameset
contains frames that invoke further calls of the CGI script,
with each call generating one frame's contents.  But there
doesn't seem to be any (single) call that sends output to
two different frames, as was requested.

Unfortunately, this is apparently what you have to do to 
make frames work.


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

Date: Fri, 05 Feb 1999 18:12:28 +0000
From: Einar Gudmundsson <einar.gudmundsson@realtime.co.uk>
Subject: setgid
Message-Id: <36BB348C.BB72982F@realtime.co.uk>

Hi, 

I'm trying to get a script to change the group associated with
some files. However the script or rather the chown command reports
that I am not allowed to do this. I'll explain the problem in more 
detail: My perl script is running under the userid and groupid of
'etg:etg'. However user 'etg' belongs to the group 'ca'. Thus I 
thought that a script run by user 'etg' would allow files created
by 'etg' to be shared by group 'ca'. But when I issue
the following commands nothing happens:

# Change group owner.
my $ca_gid = getgrnam('ca');
chown(-1,$ca_gid, $file) or error("The group of '$file' could not be
changed");

To give some more input here are the file permissions for the diffrnet
files and directories involved.

$file permission:
-rw-rw-r--   1 etg      etg            90 Feb  5 17:30 index.txt

The directory $file lives in:
drwxrwxr-x   8 etg      ca           1024 Feb  5 17:30 .

The script that runs the command (notice the setgid bit is set):
-rwsr-sr--   1 etg      ca           2815 Feb  5 17:27 server_cert

The directory where the script lives:
drwxr-xr-x   2 etg      ca           1024 Feb  5 17:27 .

So my question is how can I change the group id of a file I own to a
group I
am amember of?

Thanks in advance
Einar


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

Date: 5 Feb 1999 19:53:11 GMT
From: pjh@mccc.edu (Pete Holsberg)
Subject: Simple Question About a Scalar
Message-Id: <79fi77$171$1@lawrenceville.mccc.edu>

I would like to create a filename from a string with the
month and day (eg, 0204) appended.

I used 
	$date=system("date +%m%d");

to get the date but when I append --

	$name="XYZZY"."$date";

perl appends the numeric value, 0, and I end up with 

	XYZZY0

instead of

	XYZZY0204

How can I get what I want?

Thanks,
pete


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

Date: Fri, 05 Feb 1999 15:15:02 -0500
From: Jay Glascoe <jglascoe@giss.nasa.gov>
To: Pete Holsberg <pjh@mccc.edu>
Subject: Re: Simple Question About a Scalar
Message-Id: <36BB5146.757055DA@giss.nasa.gov>

Pete Holsberg wrote:
> 
> I would like to create a filename from a string with the
> month and day (eg, 0204) appended.
>

perldoc -f time
perldoc -f localtime

($mon, $day) = (localtime())[4, 3];
++$mon;
$new_file_name = $old_file_name . sprintf "%02d%02d", $mon, $day;


	Jay
--
http://www.giss.nasa.gov/staff/jglascoe.html


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

Date: Fri, 5 Feb 1999 12:33:27 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Simple Question About a Scalar
Message-Id: <MPG.1124f5724c099e4c989a0d@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <79fi77$171$1@lawrenceville.mccc.edu> on 5 Feb 1999 19:53:11 
GMT, Pete Holsberg <pjh@mccc.edu> says...
> I would like to create a filename from a string with the
> month and day (eg, 0204) appended.
> 
> I used 
> 	$date=system("date +%m%d");
> 
> to get the date but when I append --
> 
> 	$name="XYZZY"."$date";
> 
> perl appends the numeric value, 0, and I end up with 
> 
> 	XYZZY0
> 
> instead of
> 
> 	XYZZY0204
> 
> How can I get what I want?

You can read the descriptions of system(), qx//  and `` (back-quotes) to 
learn how to capture the output of an external command.

But that is the wrong solution in any case -- slow and not completely 
portable.  Read the description of localtime(), which gives you 
everything you want.  Use sprintf() to force leading zeros on one-digit 
values.

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


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

Date: Fri, 05 Feb 1999 19:32:11 GMT
From: chad@vcn.net
Subject: Re: storage/retrieval of text databases
Message-Id: <79fgvr$alq$1@nnrp1.dejanews.com>

In article <8690ecamsd.fsf@pc216.farm.rug.nl>,
  Marc Weeber <marc@farm.rug.nl> wrote:
> Hello all,
>
> I am looking for efficient ways of storing and retrieving information
> from large text databases.

Hard disks are cheap.  If it's a large project, I alway use MySQL ... I've
used it for sometime now and never have any problems.  Of course you may need
a 'name brand' and go for the Oracle8 for Linux, I have not use it, but it
can't be that bad.

I wonder whether it is best to use (zipped) text
> files and for use unzip them and read them into memory. I think that
> storage is efficient, but retrieval, and especially memory use may not
> be optimal. On the other hand I think of using a kind of DB format and
> use the `tie DB_File' method to retrieve and manipulate the
> information.

DB_File is great too, depending on what your doing.

> As you read I use a lot of `think', `wonder', and `may'. If one of
> you gurus can shed some light or give some references on this subject,
> I would be very pleased.
>
> Thanks in advance,
>

I'm no guru, but I do manage very large text databases (10 million) records
with the above methods.

-chad

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 05 Feb 1999 13:47:38 -0600
From: Ralph N <ralph@inlink.com>
Subject: Swap Space & Child Processes
Message-Id: <36BB4ADA.735EA92F@inlink.com>

Greetings folks,

Here's my problem:
I wrote a perl script that analyzes all of the "access_log"'s on a
system I'm hostmastering.  The box is running Solaris 2.6 with 48 megs
of ram (it's a side door to the actual server).  As part of my script I
call wwwstat via "system(blah blah blah...)".  It works just fine for
all of the logs that are less than 48 megs in size, but for anything
larger it dies "OUT OF MEMORY".  Yet I can run wwwsat on the same
scripts from a command line without any trouble (using top I can see
that atleast 12 megs of actual ram are left untouched when I run wwwstat
from a command line).  I've infact had the same problem trying to call
"cat" from system.
    It seems that none of my child processess are being given access to
the 100+ megs of alotted swap space.  Is this because I'm running them
incorrectly, have compiled perl incorrectly, or done something else
generally wrong ? =)

Any help would be appreciated,

Ralph N.
webralph@inlink.com



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

Date: Fri, 5 Feb 1999 18:09:08 GMT
From: "James M. Stern" <sternji@mail.northgrum.com>
Subject: Re: Syntax checking without "perl -c"?
Message-Id: <36BB33C4.877CF328@mail.northgrum.com>

Lloyd Zusman wrote:
> [...]
> So ... I'm wondering: is there any way within Perl that I could check
> pieces of Perl code for valid syntax, given the preferences and
> requirements I outlined above?
> [Compile it without executing it and avoid the overhead of piping the code to "perl -c."]
> [...]

No answer, just a lead and a partial solution.

Lead:  If you're willing to write some C, function perl_parse,
documented in perlembed, looks promising.  I'm no expert in that part of
Perl, though.

Partial solution:  eval "if (0) { $the_code }" but beware these
drawbacks:

   * It still executes BEGIN blocks.  (Although 'perl -c' does too.)

   * An extra '}{' in $the_code would place some of it outside the 'if'.
A more paranoiac approach would be
      eval "if (0) {{{{ $the_code }}}}"

-- 
James M. Stern                Northrop Grumman Corp.  Hawthorne, CA
Opinions expressed above are not necessarily my employer's.


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

Date: 05 Feb 1999 14:32:02 -0500
From: dc@omor.com (Autobot fodder)
Subject: test of autobot
Message-Id: <xz3ogn8mytp.fsf@panix.com>

just wondering if there is still an autoreply bot running 
on new poster addresses.

dc


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

Date: Fri, 5 Feb 1999 12:36:14 -0600
From: "Spike White" <spike_YYwhiteYY@YYdellYY.com>
Subject: Re: trouble invoking script from shell prompt
Message-Id: <79fd26$l1l$1@obsidian.us.dell.com>

What error messages do you get back when you attempt to
run it from the shell?

Andy Goodman wrote in message <79f4sn$7ct$1@pacifica.access.ch>...
>heres a really stupid newbie question:
>
>I am trying to invoke the following script from the command line of my unix
>shell:
>
>#!/usr/bin/perl
>
># reset tracking file to 0
>
>open(COO,">count.dat");
>print COO "0";
>close(COO);
>
>exit(0);
>
>
>the script is called reset.cgi, permissions are set at 755, it is in the
>cgi-bin
>
>the script runs fine when called through my browser (ie the counter file is
>reset to zero, although I receive a 500 message in my browser window)
>however I cant get it to execute in a telnet session (eventually I want to
>set this up as a cronjob)
>
>can someone help please
>
>
>




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

Date: Fri, 5 Feb 1999 21:17:59 +0100
From: "Andy Goodman" <ag1@altavista.net>
Subject: Re: trouble invoking script from shell prompt
Message-Id: <79fjjb$p8v$1@pacifica.access.ch>

I dont get any error messages:

unix displays the next prompt, and when I check the error_log file there are
no new entries.


Spike White wrote in message<79fd26$l1l$1@obsidian.us.dell.com>...
>What error messages do you get back when you attempt to
>run it from the shell?
>





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

Date: Fri, 5 Feb 1999 21:39:59 +0100
From: "Andy Goodman" <ag1@altavista.net>
Subject: Re: trouble invoking script from shell prompt
Message-Id: <79fksp$qt5$1@pacifica.access.ch>

Thanks Spike,

Actually I just found the prob (if u can believe it):

I guess its always a good idea to make sure I compile the program first....

Another Q one could add to the Idiots Guide To Solving Perl Problems...

Andy


Spike White wrote in message <79fd26$l1l$1@obsidian.us.dell.com>...
>What error messages do you get back when you attempt to
>run it from the shell?
>
>Andy Goodman wrote in message <79f4sn$7ct$1@pacifica.access.ch>...
>>heres a really stupid newbie question:
>>
>>I am trying to invoke the following script from the command line of my
unix
>>shell:
>>
>>#!/usr/bin/perl
>>
>># reset tracking file to 0
>>
>>open(COO,">count.dat");
>>print COO "0";
>>close(COO);
>>
>>exit(0);
>>
>>
>>the script is called reset.cgi, permissions are set at 755, it is in the
>>cgi-bin
>>
>>the script runs fine when called through my browser (ie the counter file
is
>>reset to zero, although I receive a 500 message in my browser window)
>>however I cant get it to execute in a telnet session (eventually I want
to
>>set this up as a cronjob)
>>
>>can someone help please
>>
>>
>>
>
>




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

Date: Fri, 5 Feb 1999 14:14:23 -0800
From: "John Doe" <user@home.com>
Subject: Unable to Delete, undef
Message-Id: <XqHu2.505$O4.3772@eagle.america.net>

I am using MLDBM in an application, and I need to delete an element.
The data is in a hash of hashes.

This syntax does not work (the data and the address remain):

delete $dbm_hash{$key}{$subkey};

although using MLDBM for a hash of arrays works fine with

delete $dbm_hash{$key};

Any thoughts out there? I am doing something obviously wrong?

Steve Kohler









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

Date: Fri, 05 Feb 1999 19:18:06 GMT
From: Brian Lavender <blavender@spk.usace.army.mil>
Subject: Unblessed reference error when using DBI::DBD
Message-Id: <79fg53$a0k$1@nnrp1.dejanews.com>

I have a test script that connects to a database. When I run the script I get
the following output and error. Whast causes the error on the "prepare" on
the unblessed reference. I believe there is a newer version of DBI::DBD, but
I don't have the priveledge to modify the install. Is there a way to make
this work without upgrading to the newer version?

brian
[wpc26: /spd/l2pmmbel]% test.pl

Hello World!

Can't call method "prepare" on unblessed reference at test.pl line 11.


[wpc26: /spd/l2pmmbel]% cat test.pl
#!/usr/bin/perl

print "Hello World!\n\n";

use DBI 0.90;

my $dbh = DBI->connect('dbi:Oracle:l2cefmp1','l2pmmbel','xxxxx');
#                 Database Instance ^^^^^^               ^^^^^ password here
$dbh->{AutoCommit};

my $query = "SELECT RR_NO FROM RECEIPT_VOUCHER";
my $sth = $dbh->prepare($query);
if ($sth -> execute) {
  @row = $sth -> fetchrow_array;
  print @row,"\n";
}


Brian E. Lavender
US Army Corps of Engineers -- Programmer / Systems Analyst
Sacramento, CA    (916) 557-6623

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 5 Feb 1999 20:36:41 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Unblessed reference error when using DBI::DBD
Message-Id: <ebohlmanF6p7x5.4yz@netcom.com>

Brian Lavender <blavender@spk.usace.army.mil> wrote:
: Hello World!

: Can't call method "prepare" on unblessed reference at test.pl line 11.


: [wpc26: /spd/l2pmmbel]% cat test.pl
: #!/usr/bin/perl

: print "Hello World!\n\n";

: use DBI 0.90;

: my $dbh = DBI->connect('dbi:Oracle:l2cefmp1','l2pmmbel','xxxxx');
: #                 Database Instance ^^^^^^               ^^^^^ password here

You never bothered to check if you were able to make the connection.  If 
you weren't, $dbh is certainly not going to be a blessed reference.

: $dbh->{AutoCommit};

This doesn't do anything.

: my $query = "SELECT RR_NO FROM RECEIPT_VOUCHER";
: my $sth = $dbh->prepare($query);
: if ($sth -> execute) {
:   @row = $sth -> fetchrow_array;
:   print @row,"\n";
: }


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 4834
**************************************

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