[7276] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 901 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 21 17:18:26 1997

Date: Thu, 21 Aug 97 14:00:23 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 21 Aug 1997     Volume: 8 Number: 901

Today's topics:
     Archives and question jreisman@jacksonville.com
     ASCII to (CGI) Perl (Bert Tijhuis)
     Can't use @ARGV in Perl5 - what's going on? (Matthew Rapaport)
     Re: changing perl to gibberish (Matthew Cravit)
     Re: Chars into Array (Malachai)
     Re: Compile error... (M.J.T. Guy)
     Debugging few modules . <szohar@sycon-design.com>
     Re: Debugging few modules . (Ilya Zakharevich)
     Re: emacs?  No thank you (Paul D. Smith)
     Re: Hash + Regex (Sami Sandqvist)
     Re: Help me !!! :) <burleigh@hackberry.chem.niu.edu>
     Re: Help with catman/makewhatis (M.J.T. Guy)
     Help with CGI.pm Script (Roddy Knight)
     Help:  Is there a way to get disk and CPU usage using p <richard@inxpress.net>
     Help: How to use "format" in a subroutine? (Edward Chen)
     HELP: Using shell commands in PERL (Andy Rutledge)
     Re: HELP: Using shell commands in PERL <burleigh@hackberry.chem.niu.edu>
     Re: How do I find the system date/time? <flavell@mail.cern.ch>
     I have a forking problems <dhayden@ford.com>
     Re: I'm looking for a perl logo... (Mike Stok)
     package wants outer subs <kistler@inf.ethz.ch>
     PERL and output of Java Applications <claude@macadamian.com>
     Perl and Web Server Side Includes - "REMOTE_HOST" (Thomas M. Blanchard)
     Perl as a C-TREE interface (JStubble)
     Re: Perl for Win32 and COM port calls (Dan Greenblatt)
     Re: perl rpm ? <khera@kciLink.com>
     problem compiling perl5.003 on Solaris <root@127.0.0.1>
     Re: shell command "more" (Terry Michael Fletcher - PCD ~)
     Re: shell command "more" (Terry Michael Fletcher - PCD ~)
     Re: split() with capturing parantheses doesn't work cor (Mike Stok)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 21 Aug 1997 18:09:54 GMT
From: jreisman@jacksonville.com
Subject: Archives and question
Message-Id: <33fc83ab.104463285@news.tu.infi.net>

Is this newsgroup archived? I'm trying to find information on
converting PERL scripts to .exe files. We played around with perl2exe
which works, but the files are huge (Is it just attaching the
interpreter to the file?) Anyone know of any other options?
-Jesse Reisman (jreisman@jacksonville.com)



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

Date: Thu, 21 Aug 97 19:53:40 GMT
From: B.Tijhuis@inter.NL.net (Bert Tijhuis)
Subject: ASCII to (CGI) Perl
Message-Id: <5ti6l4$4ri$1@news.NL.net>

We're running since some time an Intranet server and I've installed 
an HTML server.
Since then we are also running some CGI Perl scripts. 
Most of the time you only need to copy an old script and rewrite some
code to run a new one.
Then a person came to me and ask me how to write CGI perl programs.
He've tried it but he thinks that is was to difficult.

So I've made a little SCRIPT that generated (CGI) Perl Scripts.
(Using the nice Lincoln Stein CGI.pm module)

(A2CP, ASCII to CGI Perl).

It could be used by Perl newbies to read out an ASCII file with fixed 
column positions and than write to output to screen.

It's a start. The code is not very nice but it worked.

Curious: Look at

http://web.inter.NL.net/users/B.Tijhuis/perl/

for the file a2cp0.1.tar.gz

Enjoy

Comments are welcome!






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

Date: 21 Aug 1997 12:59:32 -0700
From: mjr@crl.crl.com (Matthew Rapaport)
Subject: Can't use @ARGV in Perl5 - what's going on?
Message-Id: <5ti6n4$964@crl.crl.com>

I have the Perl 5 distribution that comes on a CD included with the
book _Teach Yourself Perl 5 for Windows NT in 21 Days_ by Zhang and Till,
Sams publishing, 1997. The compiler seems to work for most things, 
though I had to rename modules like dynaload.pm to dynaloader.pm to
get the Win32 includes, etc., but for some reason, the simplest thing
I can't make work is simple access to @ARGV... Is there a known bug
here, or did I just load this all wrong...

   $string = $ARGV[0];
   print $string;

prints NOTHING but a LF when run in a script with an argument... i.e.,
those two lines in a script called test.pl run with 'test.pl argument'
produce NO output except a new line...

What is going on here? I've been writing in perl on unix for a couple
of years now, so I know I can't be that dense...


-- 
  matthew rapaport   The difference between theory and practice    KD6KVH
                     is that in theory there is no difference,   
  mjr@crl.com        but in practice, there is.             quine@dfw.net


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

Date: 21 Aug 1997 09:35:48 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: changing perl to gibberish
Message-Id: <5thqp4$1vs$1@shell3.ba.best.com>

In article <j77ht5.fm.ln@localhost>, Tad McClellan <tadmc@flash.net> wrote:
>T. Wheeler (twheeler@m-net.arbornet.org) wrote:

>: On unix machines there is often crypt command to encrypt documents.
>
>Which is a one way algorithm.
>Do you ever wanna get the code back (there is no 'decrypt' command...)?

Not to nitpick, but the UNIX command "crypt" which is available on some
UNIX versions, _is_ reversible. From the man page on Solaris:

  crypt(1)                  User Commands                  crypt(1)
 
  NAME
       crypt - encode or decode a file

The crypt() system call, OTOH, is one-way, and is not (readily) reversible.

/MC

-- 
Matthew Cravit, N9VWG               | Experience is what allows you to
E-mail: mcravit@best.com (home)     | recognize a mistake the second
        mcravit@taos.com (work)     | time you make it.


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

Date: Thu, 21 Aug 1997 16:40:41 GMT
From: rsh@sun38.humb.nt.com (Malachai)
Subject: Re: Chars into Array
Message-Id: <EF9vnt.9oI@sunsrvr6.cci.com>

On Tue, 19 Aug 1997 10:05:10 -0700, John Grimm <ken1@earthlink.net> wrote:
>How can I get a variable (say $x) into an array (say @p)?
>
>I want to get a number like -1.942 so it's like @p = (-,1,.,9,4,2)

@array = split(//, -1.942);

Strangely, it's in the documentation that comes with perl... perlfunc on split:

            A pattern matching the null string (not to be confused with a
            null pattern `//', which is just one member of the set of
            patterns matching a null string) will split the value of EXPR
            into separate characters at each point it matches that way.

-- 
M.


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

Date: 21 Aug 1997 20:38:38 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Compile error...
Message-Id: <5ti90e$mnk$1@lyra.csx.cam.ac.uk>

In article <EEysvn.BBH@unx.sas.com>, Chris Sherman <sherman@unx.sas.com> wrote:
>From pp.h, there is this following #define:
>
>#define RvDEEPCP(rv) STMT_START { SV* ref=SvRV(rv);      \
>  if (SvREFCNT(ref)>1) {                 \
>    SvREFCNT_dec(ref);                   \
>    SvRV(rv)=AMG_CALLun(rv,copy);        \
>  } } STMT_END
>
>The compiler on my machine has no idea what to make of the "copy" symbol
>in the above macro.  

That "copy" isn't a C symbol  -  it's an argument to a macro.   And the
macro definition (in pp.h) reads

#define AMG_CALLun(sv,meth) amagic_call(sv,&sv_undef,  \
                                        CAT2(meth,_amg),AMGf_noright | AMGf_unary)

so it's actually referring to the symbol copy_amg, which is defined in
perl.h.

>I get the following error from the HP/UX (cc) compiler:
>
>"gv.c", line 1327: 'copy' undefined
>"gv.c", line 1327: syntax error
>*** Error code 1
>
>This is what gcc says about it:
>
>gv.c: In function `Perl_amagic_call':
>gv.c:1327: `copy' undeclared (first use this function)
>gv.c:1327: (Each undeclared identifier is reported only once
>gv.c:1327: for each function it appears in.)
>gv.c:1327: parse error before `_amg'

Your compilers aren't understanding the above, perhaps because cppflags is
incorrectly set.


Mike Guy


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

Date: 21 Aug 1997 17:08:31 GMT
From: "Sharon Zohar" <szohar@sycon-design.com>
Subject: Debugging few modules .
Message-Id: <01bcae43$ebdb7040$1575de9e@sycon21.sycon-design.com>

I need to debug  a program that was developed in few separate
modules .
How can I use break points or step by step in modules that are
not part of the main module .

Thanks Sharon .


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

Date: 21 Aug 1997 18:53:23 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Debugging few modules .
Message-Id: <5ti2r3$rfg@agate.berkeley.edu>

In article <01bcae43$ebdb7040$1575de9e@sycon21.sycon-design.com>,
Sharon Zohar <szohar@sycon-design.com> wrote:
> I need to debug  a program that was developed in few separate
> modules .
> How can I use break points or step by step in modules that are
> not part of the main module .

Please read what debugger says you.  On start it advices to try `h h'
or `h'. `h h' produces, in particular:

  f filename  View source in file

Btw, you do not *need* even this.  If you need to set a breakpoint in
module::func, just do it (and do not forget that if you have ReadLine
working, command completion works).

However, your question may be related to debugging initialization of
`use'd modules.  Then you need to read perldebug, it contains an
answer, related to `R' command.

Hope this helps,
Ilya


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

Date: 21 Aug 1997 10:57:19 -0400
From: psmith@baynetworks.com (Paul D. Smith)
To: Kenneth Vogt <KenVogt@rkymtnhi.com>
Subject: Re: emacs?  No thank you
Message-Id: <p54t8jmvn4.fsf@baynetworks.com>

%% Kenneth Vogt <KenVogt@rkymtnhi.com> writes:

  kv> {snip:  lots of good stuff about the benefits of emacs}

  kv> Thank you for all the details, Kevin.  I didn't realize most of
  kv> them.  I guess I still go back to the same thing: why can't emacs
  kv> be less cryptic or even (dare I say) visual?

Are you running Emacs 19 under X as an X application?  In other words,
does it start its own window, or are you running it on a console or
inside an xterm?

If you're running it as an X app, in what way do you find the user
interface non-visual or cryptic?  It may not be the most fancy-looking
environment, but it certainly does all the basics in a non-cryptic way:
it has scroll bars; mouse point, selection, and paste; a menu bar that
allows you to do all the normal stuff: open a file, save a file, exit
emacs, print, cut, copy, paste, undo, search various ways, spell check,
plus a help menu, and various major modes (like cperl mode, c mode,
etc.) all have their own special menus.  Plus there are many advanced
features available via the menu bar: diff files, merge files, read mail,
read news, etc.  And there are popup menus, too.

If you're running it on the console, then there's your problem :).  If
you're running it inside an xterm, why?!?!

I often see this comment about Emacs being cryptic but whenever I ask
about specifics, I don't get a response :(.  If there are specific
complaints, please propose them to gnu.emacs.bug or gnu.emacs.help, and
perhaps something can be done.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.


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

Date: 21 Aug 1997 19:15:23 GMT
From: sami@d246a.mtalo.ton.tut.fi (Sami Sandqvist)
Subject: Re: Hash + Regex
Message-Id: <slrn5vp50a.2h8.sami@d246a.mtalo.ton.tut.fi>

On	20 Aug 1997 21:30:55 GMT, Jot Powers <news@bofh.com> wrote:
>If I were to make a guess, I'd guess that your hash value has special
>characters (say a /) that make it break.  Observe:
>

Observe:

------test.pl------
#!/bin/perl -w
$test{mykey}="this/is/the/replacement";
$_ = "Here: Replace me.\n";
s/Replace me/$test{mykey}/ig; # /ig naturally unnecessary in this program.
print;
-------------------
d246a:[~] % ./test.pl 
Here: this/is/the/replacement.
d246a:[~] %

>(Of course, I just did the following, and it didn't break:
>
>  DB<6> $_ = 'A<title></title>B'
> 
>  DB<7> $bob{'fred'} = "#joe"
> 
>  DB<8> s#<title></title>#<title>$bob{$name}</title>#ig
> 
>  DB<9> p $_
>A<title>#joe</title>B
>

It didn't break because the s///; -line gets broken to its search -
and replacement- parts long before evaluating the hash value. Had you
tested with '/' instead of '#' you would not have confused the original
poster.

Sami
-- 
#################################################
#Sami Sandqvist		#Finger for PGP key	#
#samiss@cc.tut.fi	#			#
#################################################


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

Date: Thu, 21 Aug 1997 11:44:28 -0500
From: Darin Burleigh <burleigh@hackberry.chem.niu.edu>
Subject: Re: Help me !!! :)
Message-Id: <33FC706C.124F@hackberry.chem.niu.edu>

Fabio Albanese wrote:
> 
> Hello
> 
> I'm looking for a complete guide about PERL language...
> 
> Is there something in WWW ?
> 
> Please reply me in email: falbanese@usa.net
> 
> Thanx
> 
> Fabio

perl comes with a pretty complete set of man pages;
e.g. man perl, man perlfunc, ..

see also www.perl.org
-- 
==========================================================
 - darin
burleigh@hackberry.chem.niu.edu
\\//\\//.\\//\\//.\\//\\//. http://hackberry.chem.niu.edu/HOME/dcb/
 '2 kinds of green, look out!' - dieter rot


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

Date: 21 Aug 1997 20:50:36 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Help with catman/makewhatis
Message-Id: <5ti9ms$n5p$1@lyra.csx.cam.ac.uk>

Trey Valenta <trey@zipcon.net> wrote:
>
>I'm crossposting this since I've seen this question in all three places
>now and no one had an answer (at least that I got).
>
>The problem was that Solaris was not properly creating the windex file
>for various non Sun man pages and unfortunately, the only thing anyone
>ever said what "did you try catman or makewhatis?" The real problem was
>that Sun's supplied /usr/lib/getNAME didn't account for man pages which
>have ".IX Header "NAME"" following the .SH NAME entry as almost (all?)
>the perl pages do.

This bug in pod2man will be mended in the 5.004_03 maintenance release.


Mike Guy


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

Date: Thu, 21 Aug 1997 09:13:52 -0800
From: rknig@NOSPAM.csus.com (Roddy Knight)
Subject: Help with CGI.pm Script
Message-Id: <rknig-ya02408000R2108970913520001@nntp.ix.netcom.com>

Hello,
I recently wrote a script to automate account registration on my UNIX box. 
I am recently new to the CGI.pm module.  The script I wrote runs fine but
the web browser doesn't send the information entered in the textfields back
the the CGI script.  The web browser attempts to download the output of the
script to the hard drive.  Can anyone give me some help with my script. 
Here is a copy:

#!/usr/bin/perl -w
use 5.004;
use strict;
use CGI qw(:standard);

my $writestring = "\r";
my $password = param("password");
my $Sender = "account_request\@csus.com";
my $Address = "root\@student.csus.com";
my $Subject = "Account Request Automated Form Entry";
my $username = param("username");
my $name = param("name");
print header, start_html("New Account Request Form"), h1("Account Request Form")
;
sub send_mail {
  if (!open(PIPE, "|/usr/lib/sendmail -t"))
         {
         print p("Unable to open pipe to sendmail for msg\n");

         }

      select (PIPE);
      syswrite (STDOUT, "$writestring", 5);
      $!=1;

      print <<EOT;
From: $Sender
To: $Address
Subject: $Subject
\r\n
$name wants an account as $username with $password as his/her password.
\r\n\r\n

EOT
      close(PIPE);
      select(STDOUT);
}

if(param()) {
  send_mail();
print p("Your request form has been processed.  You will be contacted when your
new account has been created."), hr();

} else {
  print hr(), start_form();
  print p("What is your full name: ", textfield("name"));
  print p("What username would you like: ", textfield("username"));
  print p("What password would you like: ", textfield("password"));
  print p(submit("submit"), reset("clear"));
  print end_form(), hr();
}
print end_html();
exit;

-- 
Remove "NOSPAM" from e-mail address to send e-mail


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

Date: 21 Aug 1997 19:47:07 GMT
From: "Richard" <richard@inxpress.net>
Subject: Help:  Is there a way to get disk and CPU usage using perl on a NT system?
Message-Id: <01bcae6b$0c741880$e525a8c0@cube444a>

Help:  Is there a way to get disk and CPU usage using perl on a NT system? 
If you could tell me how or tell me where I may find out that would be
great.

Thank you in advance for your help.

Richard


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

Date: 21 Aug 1997 15:51:51 GMT
From: etchen@bnr.ca (Edward Chen)
Subject: Help: How to use "format" in a subroutine?
Message-Id: <5tho6n$npm@bcarh8ab.bnr.ca>
Keywords: Perl, format

I am trying to use format in a subroutine,  but I got a very strange behavior
of the statement "write". See the attatched the script.  The phenomenen I
sqeezed to is:  "write" and "print" give different answers to  the same 
variables.  ( See the script and output included below.) I wonder if any one
can explain this.  What is the best way to get around this.  ( I also tried to 
swap "write" and "print", same thing happened.)

Thanks in advance for any information. 

P.S. I am using Perl 5.002

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

Edward Chen

Here is the output of this script.

===========  Begin =====================

       The Report ONE
       From print   From write
------------------------------------
                    ONE     0
         ONE,  0 
                    ONE     1
         ONE,  1 
                    ONE     2
         ONE,  2 
                    ONE     3
         ONE,  3 
                    ONE     4
         ONE,  4 
                    ONE     4
         TWO,  0 
                    ONE     4
         TWO,  1 
                    ONE     4
         TWO,  2 
                    ONE     4
         TWO,  3 
                    ONE     4
         TWO,  4 
===========  End  =====================


=============  Perl script  ==============

#!/usr/bin/perl

use English;
use strict;
sub out($$);

{   # Begin of the script.

my ( $a, $k, $m );

$a = "ONE"; $k = 4;
$m= &out($a, $k);
$a = "TWO";  $k = 4;
$m= &out("TWO", 4);
exit;

}   # End of the script.

sub out($$) {
  my ( $ms, $k, $i, $p );
  $ms = shift;
  $k = shift;
  for $i ( 0 .. $k ) {
     $p = $i;
     write ;
     print "         $ms,  $p \n";
  }
  return $ms;
format STDOUT_TOP =

       The Report @<<<<<<
                  $ms
       From print   From write
------------------------------------
 .

format STDOUT =
                    @<<<<   @<<<<<<<
             $ms,   $p
 .
}


--
--------------
Edward Chen

ESN 39+56439


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

Date: Thu, 21 Aug 1997 11:03:34 -0600
From: andyrut@binary.net (Andy Rutledge)
Subject: HELP: Using shell commands in PERL
Message-Id: <andyrut-2108971103340001@lnk1-ppp-26.binary.net>

How do I use UNIX shell commands through perl?

-- 
May your beverages be cold and your showers be lukewarm.
http://www.binary.net/andyrut/


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

Date: Thu, 21 Aug 1997 13:01:29 -0500
From: Darin Burleigh <burleigh@hackberry.chem.niu.edu>
Subject: Re: HELP: Using shell commands in PERL
Message-Id: <33FC8279.3C43@hackberry.chem.niu.edu>

Andy Rutledge wrote:
> 
> How do I use UNIX shell commands through perl?
> 
> --
> May your beverages be cold and your showers be lukewarm.
> http://www.binary.net/andyrut/


look up system and ` (backtics) in man perlfunc and/or the
camel book.

-- 
==========================================================
 - darin
burleigh@hackberry.chem.niu.edu
\\//\\//.\\//\\//.\\//\\//. http://hackberry.chem.niu.edu/HOME/dcb/
 '2 kinds of green, look out!' - dieter rot


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

Date: Thu, 21 Aug 1997 16:31:05 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How do I find the system date/time?
Message-Id: <Pine.A41.3.95a.970821181541.123866V-100000@sp055>

On Wed, 20 Aug 1997, Brad Herder wrote:

> > Better make that 1900+$year , methinks.

> Is that really correct?  Is Unix

I don't recall perl being restricted to unix

> going to return 100 in the year 
> 2000?  Or is it going to return 00?  

What did you find when you checked the documentation prior to
considering posting? 

> I'd really like to know.

Posting to usenet is only a diversion.  You'll need to verify the answer
by reading the documentation anyway, so why not do it first, and save
the extra effort?




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

Date: 21 Aug 1997 15:33:27 GMT
From: "David Hayden" <dhayden@ford.com>
Subject: I have a forking problems
Message-Id: <01bcae47$7eb910e0$6502a713@fce04438.jubilee.ford.com>

I am quite new to Perl (about 4 weeks) and have written a few programs
which worked fine. I now have a more complicated task to complete involving
forking, parent and children. I have looked at all the various FAQ, web
sites etc but all the information found is either too brief or too
complicated for the novice like me to follow. I would really appreciate
some help with this.

Below is the forking section of my program, the program is written to wait
for a response from 'MPP' for 20 seconds or timeout. 'MPP' will reply
randomly between 1 and 30 seconds. If the program times-out then the child
process is killed and I get the desired response, however if MPP replies in
time, I cannot get the program to kill the other process. 

What needs to go on the line marked ***************



 .........
sub itsforkingtime {

if(($child = fork()) ==0) {

#This is the Child Process
print"child process,$$,\n";
$a=20;
while ($a){
print "Waiting for Response From MPP, time left : ",$a,"seconds\n";
sleep (1);
$a--
}
do dokill();
$outdata = "TIMED OUT - Before we got a response from MPP";
}

#This is the parent process
else {
print"parent process,$$,\n";

oracle();          
print "Data returned is:",$outdata,"\n";
*******************
}
}

sub oracle {
$indata= $sendout;
print "The data has been sent to MPP\n";
print "We are now waiting for a reply\n";
$rnd= int(rand 30);
sleep ($rnd);
$outdata = substr($indata,0,100);
}
}

sub dokill {
kill 9, $child if $child;
}                           








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

Date: 21 Aug 1997 13:32:35 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: I'm looking for a perl logo...
Message-Id: <5thg1j$iel@news-central.tiac.net>

In article <33FC12C7.C8D3F19@absyss.fr>, Doug Seay  <seay@absyss.fr> wrote:
>Jim Scofield wrote:
>> 
>> Don't laugh.  From what I hear, Gateway is going after companies that use
>> Cows for marketing.
>
>Does this mean that Ben&Jerry's are in trouble?

If they start selling computers then they are.  In the unlikely event a
company should happen to use camels to advertise cigarettes then there
would be no problems, but if that company diversified into selling perl
software and used Joe Camel to promote it then O'Reilly may get upset as
their work to associate camels and perl is beoing infringed. Apple records
let Apple computers use the apple logo as long as they didn't start
selling musical goods, I think. 

Way off subject, and quite possibly wrong :-)

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Thu, 21 Aug 1997 21:38:37 -0700
From: Per Kistler <kistler@inf.ethz.ch>
Subject: package wants outer subs
Message-Id: <33FD17CD.40FCA781@inf.ethz.ch>

Hi All

What can I do, that my perl package can execute functions
from the calling script and also use it's variables?
Something like import * .....?

Thanks, Per.
-- 
Per Kistler, Unix Systems Administrator, kistler@inf.ethz.ch
Swiss Federal Institute of Technology, Zuerich, Switzerland
---------------------------------------------------------------------


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

Date: Thu, 21 Aug 1997 12:18:57 -0400
From: Claude Montpetit <claude@macadamian.com>
Subject: PERL and output of Java Applications
Message-Id: <33FC6A71.4DECC39@macadamian.com>

I have a java application loaded by a PERL script thru CGI.  The loading

of the application works perfectly but when the applcation uses
System.out.println to output some HTML code,  the output does not get to

the browser.  Any idea on how I could output from the Java application
when called by a PERL script?

Claude Montpetit





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

Date: Tue, 19 Aug 1997 21:55:11 GMT
From: tmblanchard@mar.lmco.com (Thomas M. Blanchard)
Subject: Perl and Web Server Side Includes - "REMOTE_HOST"
Message-Id: <33fa1546.37105890@butch.lmsc.lockheed.com>

I've been using Purveyor Web Server for NT for a couple of years now
with good results.  However, it looks like Process Software is going
to stop marketing or supporting it.

I think I can convert all of my web pages to Microsoft's IIS,
including several Perl scripts, but I can't get IIS to use a DNS to
display "REMOTE_HOST" from a Server Side Include.  It always returns
the IP address ("REMOTE_ADDR") instead.

Is there a very simple Perl script that will display the CGI variable
"REMOTE_HOST" on a web page? 


Thomas M. Blanchard			tmblanchard@mar.lmco.com
Lockheed Martin Aeronautical Systems	(770) 494-2766
Dept. 49-31, Facilities Engineering	(770) 494-8006 FAX
86 S. Cobb Dr.
Marietta, GA 30063-0426



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

Date: 21 Aug 1997 16:10:33 GMT
From: jstubble@aol.com (JStubble)
Subject: Perl as a C-TREE interface
Message-Id: <19970821161000.MAA02647@ladder01.news.aol.com>

Hello,

Has anyone ever used Perl to interface with C-TREE?  If so, can you
provide some code for me to look at?  It would be greatly appreciated! 
Preferably please respond via e-mail to joe@stubblebine.com

Thanks!

Joe


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

Date: Thu, 21 Aug 1997 09:46:41 -0700
From: danielg@ea.com (Dan Greenblatt)
Subject: Re: Perl for Win32 and COM port calls
Message-Id: <danielg-ya02408000R2108970946410001@nntp2.ba.best.com>

In article <33fb2096.15327247@news.golden.net>, knetsch@golden.net.no.spam
(SJK) wrote:

> On Mon, 18 Aug 1997 11:41:01 -0700, danielg@ea.com (Dan Greenblatt) wrote:
> 
>>[my own article]
> 
> Ummm.. forgive me if this seems like a stupid question.  Are you sure you are
> listening to the right port?  Most PCs have a mouse attached to COM1 and the
> modem is on COM2.  The modem on COM1 caught me as being unusual....

I wish it were that easy.  No, my machine uses a bus (PS/2) mouse, and I've
used HyperTerm to verify that COM1 is the port the modem's broadcasting on. 


Right now, I'm working around it rather kludgily:
1) Using HyperTerm to capture the data stream to a file
2) Using Win95 System Agent to upload the file to my UNIX machine every 10
minutes, and
3) Running a crontab on the UNIX box to process the file w/ Perl every time
it uploads.

Since it eventually has to get to the UNIX machine anyway, it works...god
forbid my PC crashes (yeah right), but it works.

> 
> Otherwise, no I don't have anything useful to add...

Well, thanks anyway...

> Cheerfully ducking flames
> 
> Stuart K.
> 
> 
> Stuart Knetsch
> 
> Remove the you know what from my address to send me E-mail

-- 
Dan Greenblatt                               danielg@ea.com
Lord of the Snow Monkeys                     Electronic Arts
These are MY opinions, not my employer's.  Capiche?


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

Date: 21 Aug 1997 13:03:03 -0400
From: Vivek Khera <khera@kciLink.com>
Subject: Re: perl rpm ?
Message-Id: <x7n2mbbha0.fsf@kci.kciLink.com>

>>>>> "D" == Daan  <dvreijen@solair1.inter.nl.net> writes:

D> I'm looking for the perl 5.004 rpm. I tried compiling the perl sources but
D> for some reason it can't locate gcc on my machine.
D> I'm running redhat 4.0 on a pentium and for several resons do not want to
D> upgrade to RH4.2

You're running Red Hat Linux... so how about checking the Red Hat web
site for the currently available RPM packages? I believe one of them
is Perl 5.004.


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

Date: 21 Aug 1997 12:06:22 -0400
From: Fil Krohnengold <root@127.0.0.1>
Subject: problem compiling perl5.003 on Solaris
Message-Id: <ehu3gj7c75.fsf@127.0.0.1>


Hello all - 

Problems are surfacing in the db-btree, db-hash, and db-recno tests.  And
they go a little something like this:

pariah:/amnh/src/perl/perl5.003/t> ../perl lib/db-btree.t
1..76
ok 1
ok 2
[...]
ok 18
ld.so.1: ../perl: fatal: relocation error: symbol not found: dbopen: \
	referenced in ../lib/auto/DB_File/DB_File.so
Killed
pariah:/amnh/src/perl/perl5.003/t> 

I had identical results with both gcc 2.7.2.1 and Sun's Sparcworks4.0
(cc).

		help?  

Thanks
___________________________________________________________________________
Fil Krohnengold    |  UNIX Systems Admin, Interdepartmental Laboratories
fil-at-amnh.org    |  The American Museum of Natural History 
212/769-5294	   |  CPW @ 79thSt / NY, New York / 10024


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

Date: 21 Aug 1997 17:08:17 GMT
From: tfletche@pcocd2.intel.com (Terry Michael Fletcher - PCD ~)
Subject: Re: shell command "more"
Message-Id: <5thsm1$h0g$1@news.fm.intel.com>

sabrina chan (schan@rice.edu) so eloquently and verbosely pontificated:
> This is probably a newbie question, but I've been going through the man 
> pages and faqs and can't find the answer... I wrote a script that gathers 
> various information into one file, and then I want to output this file to 
> the screen.  However, I can't figure out how to output it in the style of 
> the command "more", ie stopping and asking for a key to be pressed when 
> the screen is full.  If anyone can help, I'd really appreciate it.

just open a pipe.  opening pipes is shown in the man pages, but not
explicitly shown is the useful opening of "|more".  this is a simple
script so you can see how it works:

open (MORE,"|more") || die "oops\n";
open (YOURFILE,"<yourfile") || die "shucks\n";
@file = <YOURFILE>;
print MORE @file;
close (YOURFILE);
close (MORE);	# this line is *essential*

that should do it.

--
print   "J"                      ."u".        #    -- Terry Fletcher
        "s"    ."t".    " A",     "n"         # tfletche@pcocd2.intel.com
   .    "o"   ,""."".   "the",    "r ","P".   #  Views expressed....not
   "e"."rl"   ." Ha",   "c",''    .""  ."".   #  INTeL's....yadda yadda
      ""            ,   "k".      "e"  ."r"  ;#          yadda....



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

Date: 21 Aug 1997 17:20:58 GMT
From: tfletche@pcocd2.intel.com (Terry Michael Fletcher - PCD ~)
Subject: Re: shell command "more"
Message-Id: <5thtdq$h9u$1@news.fm.intel.com>

Terry Michael Fletcher - PCD ~ (tfletche@pcocd2.intel.com) so eloquently and verbosely pontificated:

> open (MORE,"|more") || die "oops\n";

hey, while im at it, maybe i could also give you less information :)

if you are unfamiliar with it, shell command "less" is more than "more",
in that you can move backward through a file, and its quick at reading
large files.  you might want to use that instead, if it is installed on
your system (it should be if it isnt!). it uses "more" commands, and "vi"
commands.  most people i know actually alias "more" to "less".  just
remember, "less" is "more" :)

now you can say you know the shell commands, more or less :)

--
               "Give me ambiguity or give me something else."
 ______                       ______ _               _               
(_) |                        (_) |  | |             | |              
    | _   ,_    ,_              _|_ | |  _ _|_  __  | |     _   ,_   
  _ ||/  /  |  /  |  |   |     / | ||/  |/  |  /    |/ \   |/  /  |  
 (_/ |__/   |_/   |_/ \_/|/   (_/   |__/|__/|_/\___/|   |_/|__/   |_/
*+*+*+*+*+*+*+*+*+*+*+* /| *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+* 
                        \|    tfletche@pcocd2.intel.com
*+*+*+*+*+ Views expressed...not INTeL's...yadda yadda yadda.... *+*+*+*+*+*


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

Date: 21 Aug 1997 14:44:00 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: split() with capturing parantheses doesn't work correctly!
Message-Id: <5thk7g$mie@news-central.tiac.net>

In article <33FB20C0.B8458B7@mission.base.com>,
Michael Schilli  <mschilli@mission.base.com> wrote:
>Hi Folks,
>
>the match operand with split() doesn't work as I would expect with
>capturing parantheses when an alternative is given. Let me explain this
>real quick:

>@a = split(/(b)|\s+/, "a b c");

depending on whether you want the sequence " b " to have empty fields
between the space and b you might want one of:

  @a = grep {not /\s+/} split /(b|\s+)/, "a b c";

or

  @a = grep {not /^\s*$/} split /(b|\s+)/, "a b c";

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

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

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