[6614] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 239 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 5 23:07:31 1997

Date: Sat, 5 Apr 97 20:03:06 -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           Sat, 5 Apr 1997     Volume: 8 Number: 239

Today's topics:
     Re: Parser gets confused with '@' in strings <rootbeer@teleport.com>
     Re: PERL - Development Environment <jong@mrc-lmb.cam.ac.uk>
     Re: Perl Alpha Compiler <jong@mrc-lmb.cam.ac.uk>
     Re: Perl CGI Problem (Tad McClellan)
     Perl for Windows 3.11 (16 bits) <username@nl.oracle.com>
     Re: Perl listserve? (Clay Irving)
     Re: Perl Mail Parser Question lvirden@cas.org
     Re: PERL Training Course <randy@randysoft.com>
     Re: Perl vs. C/C++ (Jason C Austin)
     Re: Perl vs. C/C++ (Leslie Mikesell)
     Personal Oracle7 and Windows95 <cybrghst@tir.com>
     Re: Personal Oracle7 and Windows95 (John D Groenveld)
     pipes vs. xsubs <amhardin@erols.com>
     Re: problem with file handling in perl (Tad McClellan)
     Re: problem with file handling in perl (Tim Gim Yee)
     Re: problem with file handling in perl <rootbeer@teleport.com>
     Re: PROBLEM:  Can't call method "import" in empty packa <rootbeer@teleport.com>
     Publishing news <trantech@tdl.com>
     Re: Publishing news (Nathan V. Patwardhan)
     Question: how to access the personal address book using <mark@axis5.demon.co.uk>
     Re: Question: Using perl to execute shell commands <randy@randysoft.com>
     Re: Radom Generator <jong@mrc-lmb.cam.ac.uk>
     REQ: help # Need sequential numbers augmented to @varia (RGA@IO.COM)
     Second Attempt: Multiple Page Perl Scripts??? <emperor@Pathway1.pathcom.com>
     Re: Second Attempt: Multiple Page Perl Scripts??? (Nathan V. Patwardhan)
     simple ? about -e (Geoffrey Hebert)
     Re: simple ? about -e (Tim Gim Yee)
     Re: skipping around in file being read... (David Combs)
     Re: Solid Calls <rootbeer@teleport.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 4 Apr 1997 16:53:18 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jamie Gritton <gritton@iserver.com>
Subject: Re: Parser gets confused with '@' in strings
Message-Id: <Pine.GSO.3.96.970404164827.21773E-100000@kelly.teleport.com>

On 2 Apr 1997, Jamie Gritton wrote:

>    When the perl 5 parser complains about "literal @" in a string, it
> gets confused by "statement if expr" forms.  The following should be
> perfectly legal (and does in fact work in perl 4):
> 
> print "@d\n" if @d = (1);

Well, the parser sees @d interpolated before it is used, so naturally it
complains. Try 'use vars' or simply re-ordering that statement. (Perl 4
took extra steps at runtime, slowing things down, in order to decide then
whether you meant '@d' or "@d" there.)

>    Note that these alternates work without a problem:
> 
> @d = (); print "@d\n" if @d = (1);
> 
> @d = (1) and print "@d\n";

Yep, in both of those, you're using @d where the parser can see it before
it parses the interpolated form. Just what I'd expect. 

Since "@d\n" is translated internally into something like join($", @d) .
"\n", you could use that code to get the same effect. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Sat, 05 Apr 1997 20:52:00 +0100
From: "Park J. H." <jong@mrc-lmb.cam.ac.uk>
To: David McGuffie <dmcguffi@isp.ford.com>
Subject: Re: PERL - Development Environment
Message-Id: <3346AD60.15FB@mrc-lmb.cam.ac.uk>

David McGuffie wrote:
> 
> Is there a PERL development environment, "IDE", available ?
> 

Not a very good one. UNIX itself is the env. for now.
It will be a hit if anybody make  such an IDE.

Jong


> --
> David McGuffie

-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter

http://www.smli.com/people/john.ousterhout/scripting.html


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

Date: Sat, 05 Apr 1997 21:43:13 +0100
From: "Park J. H." <jong@mrc-lmb.cam.ac.uk>
To: Dan Ascheman <asched1@medtronic.COM>
Subject: Re: Perl Alpha Compiler
Message-Id: <3346B961.1CFB@mrc-lmb.cam.ac.uk>

Dan Ascheman wrote:
> 
> Does anybody know how to use the Perl Alpha compiler in conjuction with
> Perl 5.002 OR 5.003 in order to convert a Perl script into C source code??
> 
> Thanks,
> Dan
> 
> --
> Dan Ascheman
> @medtronic.com
> instruments  phone: x4880  Mail Stop: T426

Have a look at  

http://ind5.mrc-lmb.cam.ac.uk/perl_compiler.html

and go to CPAN to get Malcolm's compiler.


Jong



-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter

http://www.smli.com/people/john.ousterhout/scripting.html


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

Date: Fri, 4 Apr 1997 16:44:35 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Perl CGI Problem
Message-Id: <j804i5.49q.ln@localhost>

RFinizio@3mail.3com.com wrote:
: I also have been having this problem going from Netscape 3.01 to
: a Digital Unix Workstation acting as the server. Please post any
: answers to the newsgroup. Thanks!!
  ^^^^^^^^^^^^^^^^^^^^^^^^

Please do *not* answer in this newsgroup.

This is the perl newsgroup.

The problem is NOT a perl problem.

It is a CGI/server configuration problem.



You will have much better luck getting answers to your questions
if you take the time to figure out where the experts on that
particular topic hang out.



For this problem, you should be trying:

comp.infosystems.www.authoring.cgi
comp.infosystems.www.servers.ms-windows


: > I am running IIS 2.0 on NT 4.0 server and using perl 5.001 build 110 I
: > believe....I am trying to run perl scripts as cgi scripts but every time
: I
: > go to do that the brower goes to download the requested perl file instead
: > of executing it.
: > Any thoughts?  The perl install did place a mapping for .pl files to the
: > perl binary in the registry..

: I am having the same problem.  If I find the answer I will be sure to let
: you know.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Fri, 04 Apr 1997 16:37:24 +0200
From: username <username@nl.oracle.com>
Subject: Perl for Windows 3.11 (16 bits)
Message-Id: <33451224.727E@nl.oracle.com>

All,

Does anybody know if Perl is ported to windows 3.11 (16 bits) and if so,
where can I find it?
Thanks in advance,

k r Frank


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

Date: 5 Apr 1997 09:53:58 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Perl listserve?
Message-Id: <5i5p26$pnc@panix.com>

In <33457D0B.6B20@cornell.edu> Rob de Roos <rd19@cornell.edu> writes:

>Is there an e-mail list discussion group for Perl?

>	If there is a mailing list also, let me know.

Sure! There are lists of lists. :)

Check: http://www.panix.com/~clay/perl/query.cgi?lists+index

-- 
Clay Irving                                        See the happy moron,
clay@panix.com                                     He doesn't give a damn,
http://www.panix.com/~clay                         I wish I were a moron,
                                                   My God! Perhaps I am!


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

Date: 5 Apr 1997 10:52:15 GMT
From: lvirden@cas.org
Subject: Re: Perl Mail Parser Question
Message-Id: <5i5asv$1rm@srv13s4.cas.org>


According to Anirvan Chatterjee  <anirvan@crl.com>:
:Luigi Mattera <mattera@ssga.ssb.com> wrote:
::   I've been trying write a mail parser for Perl on a unix system.  It

:: catch the body for a single message, but how to do it over multiple
:: messages has me stumped beyond belief.
:
:I've found that mbox style unix mailboxes generally have /^From\s+/ at
:the beginning of every message. You can use this fact to tailor your

While this is _generally_ true, it is not _universally_ true.  One
must make sure that the site in question isn't using Content-Length
instead of the 'From ' mechanism.

-- 
Larry W. Virden                 INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.


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

Date: Sat, 05 Apr 1997 11:56:17 -0800
From: Randy Hootman <randy@randysoft.com>
Subject: Re: PERL Training Course
Message-Id: <3346AE61.562C@randysoft.com>

I am assuming that you are looking for a professional training course in
perl. Please take a look at my web site http://www.randysoft.com

I produce professional, interactive web based training courses in
computer programming. You can take the demo versions of the course at my
web site.

My training allows you to take a lesson and write code and submit the
code to the server for interpretation. The results are returned to you.
Therefore, the person taking the training does not have to have a
development environment nor perl on their system. You will see how this
works if you take the demo course in perl.

This is being used by Hewlett-Packard and Lucent Technologies for their
internal training. It has been very successful and they are requesting
more of this type training from me on other topics.

Randy Hootman


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

Date: 04 Apr 1997 19:04:35 GMT
From: jason@quake.cs.odu.edu (Jason C Austin)
Subject: Re: Perl vs. C/C++
Message-Id: <JASON.97Apr4140435@quake.cs.odu.edu>

In article <5i153t$f86$1@mainsrv.main.nc.us> scott@lighthouse.softbase.com () writes:
=> Dan Corbett (dcorbett@jcaho.org) wrote:
=> : I am evaluating languages to use for creating a program to basically
=> : read in a file, parse out some text, and rewrite the file.
=> 
=> Having used perl and many other languages, I must say I prefer
=> perl for any type of text file grinding and munging. Also, unless
=> the program (and sometimes even if) needs to be distributed
=> as a top-secret trade secret or has to do exotic system 
=> interfacing, or has to link in to other code, perl can be
=> written extremely fast. You're still rewriting C memory
=> management routines by the same point in time you'd be
=> finished in perl.

	Which doesn't matter in a project of any size.  Almost all
your resources in a full blown application go to design, bug fixing,
and improvements.  Coding is the easy part and the time it takes is
negligible.  C++ is far superior when it comes to large scale
projects.

	As far as extremely fast, I've done a lot of testing, and the
perl programs commonly took 200 times longer to run an exact
translation of the C code.  Even if you could get that down to twice
as long, I'm not going spend a million on a computer and get the same
performance as a competitor that spent $500,000.

	On the other hand, perl is excellent for a lot of system admin
and text scanning tasks.  I can throw a quick script together that
would take a couple of hours in C.  I do still use C when reliability
is important since perl is much more bug prone due to its lack of
strict data typing and function prototypes.  People have tried to tell
me perl is more reliable since it won't crash on memory handling
errors, but I would much rather have a program crash then to happily
run for days producing completely wrong answers.


=> : 	2) How well does it handle files and strings?
=> 
=> Not only those two, but *LISTS*. The missing link in C (if you'll
=> pardon the pun) is lists. You have data in a file.  You have strings.
=> The missing link is chopping the records into fields. You can do this
=> in C via parsing, but in perl, lists are much easier. From file
=> to string to list of fields in the string is trivial in perl.
=> 
=> Perl handles strings at a much higher level than C! All memory
=> allocation and management is done for you, and that code
=> was written to be very efficient by a master hacker. Thus,
=> all you do is use strings without worrying about them.

	We are talking about C++ and the STL has these data structures
along with the automatic memory handling.  Even if you don't have a
template library, it doesn't take long to write it once and never
think about it again.  If you ever tried to do highly advanced data
structures in perl (beyond simple lists of lists, strings, etc),
you'll end up pulling you hair out at the pile of nasty syntax.

=> Perl handles files better than C does, because it allows you to
=> read the entire file into an array with one fell swoop, and process
=> the array. (You don't even have to explicitly define the array! :))

	That's hardly a difference.  You can read an entire file into
memory in any language if you so desire.

=> 
=> : 	3) What about support and documentation?	
=> 
=> Perl actually works, which makes support less relevant than it
=> would be for other things. Also, you have the source code, so you
=> can fix it when it doesn't. (People who use perl tend to be
=> people who could do that, and the time savings are enormous.)
=> Perl is copiously documented both online and through the
=> Camel book.

	So, are you saying C doesn't work?  A pointless comment since
perl and the OS is written in C.
---
Jason C. Austin
austin@visi.net



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

Date: 5 Apr 1997 13:54:21 -0600
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Perl vs. C/C++
Message-Id: <5i6ald$k9m$1@Venus.mcs.net>

In article <JASON.97Apr4140435@quake.cs.odu.edu>,
Jason C Austin <austin@visi.net> wrote:
>=> Dan Corbett (dcorbett@jcaho.org) wrote:
>=> : I am evaluating languages to use for creating a program to basically
>=> : read in a file, parse out some text, and rewrite the file.
>=> 
>=> Having used perl and many other languages, I must say I prefer
>=> perl for any type of text file grinding and munging. Also, unless
>=> the program (and sometimes even if) needs to be distributed
>=> as a top-secret trade secret or has to do exotic system 
>=> interfacing, or has to link in to other code, perl can be
>=> written extremely fast. You're still rewriting C memory
>=> management routines by the same point in time you'd be
>=> finished in perl.
>
>	Which doesn't matter in a project of any size.  Almost all
>your resources in a full blown application go to design, bug fixing,
>and improvements.  Coding is the easy part and the time it takes is
>negligible.  C++ is far superior when it comes to large scale
>projects.

Where do you find the C++ equivalent of the perl modules available
from CPAN so you don't have to to all that design, bug fixing and
improvement from scratch?  How much time does it take to make the
C++ code portable?  Last time I looked, including a header file
that might not exist on a different platform was a fatal error.
Perl generally takes care of OS differences for you, assuming you
can compile it or obtain binaries.  How much extra work is it
to make it happen internally in a web server compared to adapting
perl code to run under apache with mod_perl?

>	As far as extremely fast, I've done a lot of testing, and the
>perl programs commonly took 200 times longer to run an exact
>translation of the C code.  Even if you could get that down to twice
>as long, I'm not going spend a million on a computer and get the same
>performance as a competitor that spent $500,000.

Yes, if you absolutely have to wrap loops around doing things a
byte at a time but you almost never need to do that in perl when
you are parsing text.  Did you try writing the optimum perl code
first, then translating that to C++?

>	On the other hand, perl is excellent for a lot of system admin
>and text scanning tasks.  I can throw a quick script together that
>would take a couple of hours in C.  I do still use C when reliability
>is important since perl is much more bug prone due to its lack of
>strict data typing and function prototypes.

Can you give an example of how you can screw up a text handling
program this way?

Les Mikesell
  les@mcs.com


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

Date: 5 Apr 1997 05:49:23 GMT
From: "Michael A Dustin" <cybrghst@tir.com>
Subject: Personal Oracle7 and Windows95
Message-Id: <01bc4185$143e1500$957865ce@michaeld>

Is there a perl module that can let perl talk to Personal
Oracle 7 installed on a Windows95 machine connected
to the internet ??

Will OraPerl do this ??  And if so where can I get OraPerl

--thanx
--dusty





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

Date: 5 Apr 1997 21:36:47 -0500
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Personal Oracle7 and Windows95
Message-Id: <5i727v$281$1@tholian.cse.psu.edu>

In article <01bc4185$143e1500$957865ce@michaeld>,
Michael A Dustin <cybrghst@tir.com> wrote:
>Is there a perl module that can let perl talk to Personal
>Oracle 7 installed on a Windows95 machine connected
>to the internet ??
>
>Will OraPerl do this ??  And if so where can I get OraPerl

I've never done this, but a quick search of http://www.dejanews.com/ for
"oraperl and odbc" yields some hints.

Happy hunting,
John
groenvel@cse.psu.edu


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

Date: Sat, 05 Apr 1997 09:33:31 -0500
From: "Annie P. Harding" <amhardin@erols.com>
Subject: pipes vs. xsubs
Message-Id: <334662BB.7C5@erols.com>

I am trying to write a perl script that will accept user input then
pass some variables to a C program which will display the results.
I've been reading the perlxstut and perlxs pages along with some
articles on using pipes to call the c program. It seems relatively 
simple to create a pipe to pass the variables, so my question is why 
would you use XSUBs as opposed to pipes. What are the advantages and 
disadvantages to each? I dont need to return control to the calling 
program. Also, can anyone point me to doc on using pipes?
  Thanks...
    Ann


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

Date: Fri, 4 Apr 1997 17:24:39 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: problem with file handling in perl
Message-Id: <nj24i5.2dq.ln@localhost>

Alestair B. Niere (niere@ntep.nec.co.jp) wrote:
: Hello,

:    I am studying perl for a week now.
:    I made this simple CGI script but once this script is executed by
:    clicking the submit button, Netscape generates an error.

:       Netscape Error: Document contains no data

: Here is the script:

: ---------- start of code ---------

: #!/usr/local/bin/perl -w

[ snip reinvention of wheel code ]

: print "Content-type: text/html\n\n";

: if ( -e "$file" ){
:   open( FIL, ">>$file" ) or die "Unable to open $file\n";
: }
: else{
:   open( FIL, ">$file" ) or die "Unable to open $file\n";
: }


:   I tried to comment out those file manipulation routines and print
:   the output to STDOUT then it works fine.

So, it is probably executing the die() then.

So, it quit before it generated any HTML.

So, the Document that the browser say contained no data  ;-)


:   What is lacking with this code.

Nothing.

You likely have a file/directory permission problem.

This is a CGI/server configuration problem.

It is not a perl problem, and so this is not the right newsgroup.

Try:

comp.infosystems.www.authoring.cgi
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Sat, 05 Apr 1997 04:12:03 GMT
From: tgy@chocobo.org (Tim Gim Yee)
Subject: Re: problem with file handling in perl
Message-Id: <3345c576.205636349@news.seanet.com>

On 4 Apr 1997 10:22:47 -0500, "Alestair B. Niere"
<niere@ntep.nec.co.jp> wrote:

>Hello,
>
>   I am studying perl for a week now.
>   I made this simple CGI script but once this script is executed by
>   clicking the submit button, Netscape generates an error.
>
>      Netscape Error: Document contains no data

If it works on the command line, then it's a CGI problem.  Shoo, shoo!

>Here is the script:
>
>---------- start of code ---------
>
>#!/usr/local/bin/perl -w
>
>$data = $ENV{"QUERY_STRING"};
>$data =~ tr/+/ /;                               
>$data =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

Ouch!  Get CGI.pm.  Don't re-invent the wheel.  Let the module process
the form/query string for you.

>@keyval = split( /&/, $data );                  
>$count = 0;
>$file = "/share4/home/niere/.www/cgi-bin/bug.data";
>
>print "Content-type: text/html\n\n";

Guess what?  That was the only line you printed to STDOUT :)

>if ( -e "$file" ){
>  open( FIL, ">>$file" ) or die "Unable to open $file\n";
>}
>else{
>  open( FIL, ">$file" ) or die "Unable to open $file\n";
>}

open (FIL, ">>$file") or die "$0 couldn't open $file: $!";

You don't need the if/else to test if your file exists.  If it doesn't
exist, it will be created for you.

>while ( $keyval[$count] ne "" ) {
>  ($key,$value) = split(/=/, $keyval[$count]);  
>  $hash{$key} = $value;                         
>  $count++;
>}
>
>$count = 1;
>foreach $keys ( %hash ){
>  print FIL "<i>$keys  $hash{$keys}</i><br>" unless ( $count%2 == 0 );
>  $count++;
>}

foreach $keys (keys %hash) {
  print "<I>$keys  $hash{$keys}</I><BR>";
}

>close( FIL );
>
>------- end of code ---------
>
>  I tried to comment out those file manipulation routines and print
>  the output to STDOUT then it works fine.
>  What is lacking with this code.

Yep.  Just print to STDOUT.


-- Tim Gim Yee             tgy@chocobo.org
http://www.dragonfire.net/~tgy/moogle.html
"Will hack perl for a moogle stuffy, kupo!"


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

Date: Sat, 5 Apr 1997 05:00:31 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Alestair B. Niere" <niere@ntep.nec.co.jp>
Subject: Re: problem with file handling in perl
Message-Id: <Pine.GSO.3.96.970405045919.2974F-100000@kelly.teleport.com>

On 4 Apr 1997, Alestair B. Niere wrote:

>    I am studying perl for a week now.
>    I made this simple CGI script but once this script is executed by
>    clicking the submit button, Netscape generates an error.

When you're having trouble with a CGI form in Perl, you should first look
at the please-don't-be-offended-by-the-name Idiot's Guide to solving such
problems. It's available on the perl.com web pages. Hope this helps!

   http://www.perl.com/perl/
   http://www.perl.com/perl/faq/
   http://www.perl.com/perl/faq/idiots-guide.html

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Sat, 5 Apr 1997 06:30:20 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Curtis Hrischuk <ceh@tiros.sce.carleton.ca>
Subject: Re: PROBLEM:  Can't call method "import" in empty package <file>
Message-Id: <Pine.GSO.3.96.970405062829.6533A-100000@kelly.teleport.com>

On 4 Apr 1997, Curtis Hrischuk wrote:

> Hi.  Perl 5.001 is reporting that it can't call the method "import" in
> the package "trace" from a source file.  
> 
> In the source file I have the statement "use trace;".
> 
> The file "trace.pm" exists and is located in the directory
> '/home/ceh/ObjecTime/xa'.
> 
> Before the 'use' statement I have inserted an 'push(@INC,
> '/home/ceh/ObjecTime/xa');'.

use happens at compile time, but push happens at run time. Maybe you need
to put that push into a BEGIN (or, better, 'use lib' instead) before the
use. (If that's not it, maybe trace.pm isn't a proper Perl module.) Hope
this helps! 

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Sat, 05 Apr 1997 08:15:04 +0900
From: Hiroshi Ishii <trantech@tdl.com>
Subject: Publishing news
Message-Id: <33458B78.54B0@tdl.com>

I'd like to generate a daily personal news page by gathering bits of
information on other public sites and formating to individual
preference.

Are there any thing like that available?


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

Date: 5 Apr 1997 17:02:24 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Publishing news
Message-Id: <5i60j0$4d7@fridge-nf0.shore.net>

Hiroshi Ishii (trantech@tdl.com) wrote:
: I'd like to generate a daily personal news page by gathering bits of
: information on other public sites and formating to individual
: preference.

(1) Yes, get the LWP modules, aka libwww-5 from:
http://www.perl.com/CPAN/modules/by-module/LWP
(2) READ the excellent documentation about retrieving information from
remote sites.
(3) Follow-Up to comp.infosystems.www.authoring.cgi for CGI programming
issues.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Sat, 05 Apr 1997 15:04:23 GMT
From: "Mark Swinson" <mark@axis5.demon.co.uk>
Subject: Question: how to access the personal address book using the OLE module
Message-Id: <01bc41d2$2752b2c0$b13e989e@axis5.demon.co.uk>


 Hi ,

 has anyone had any success accessing the Microsoft Exchange personal
 address book through OLE Automation. If it is possible I'm not sure what
 the specifics are - MSExchange help does'nt .. and the Perl-Win32 faq
 only mentions MAPI briefly..

 Can anyone help or at least point me in the right direction ...


 Thanks

 Mark/
 


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

Date: Sat, 05 Apr 1997 11:48:22 -0800
From: Randy Hootman <randy@randysoft.com>
Subject: Re: Question: Using perl to execute shell commands
Message-Id: <3346AC86.185F@randysoft.com>

Jason J. Levit wrote:
> 
> Hi everyone,
> 
>   I'm trying to use perl to execute some simple shell commands, but
> since they're built into the shell (i.e., sh, csh, tcsh, etc.), perl
> can't
> seem to handle them.  For example, if I the perl command:
> 
>   system 'source $name';
> 
>   or
> 
>   system 'setenv $name';
> 
>   ...both of these come up with the shell error 'source: command
> not found'.  Obviously, /bin/sh/source doesn't exist, since it's
> built into the shell.  However, I do have the need of sourcing
> some files and setting some environment variables to run another
> program, which actually uses these environment variables to run.
> The perl script handles passing various values to be input into
> the program...does anyone know how I can get around this?
> 
>   Thanks for any help!
> 
>   Jason Levit
>   jlevit@ou.edu
> 
> ----------------------------------------------------------------------------
> Jason John Levit, N9MLA                       Graduate Research,
> University of Oklahoma          Center for Analysis and Prediction of
> Storms
> School of Meteorology                           jlevit@ou.edu
> 405/325-0453                             http://wwwcaps.gcn.ou.edu/

You can invoke the shell in front of the other commands:

system 'csh source $name';

Randy Hootman


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

Date: Sat, 05 Apr 1997 17:35:35 +0100
From: "Park J. H." <jong@mrc-lmb.cam.ac.uk>
To: Joshua Davis <daviso@mcnet.marietta.edu>
Subject: Re: Radom Generator
Message-Id: <33467F57.446B@mrc-lmb.cam.ac.uk>

Joshua Davis wrote:
> 

seed the rand function with your own choice,



     srand(((time/$$)^($>*time))/(time/(time^$$)));
      srand(time()|$$);

     
      srand(time^$$)



> Hi I am not on this list so please email me personally...
> 
> I need a BETTER random number generator than the builtin one for perl
> Does anyone have any ideas?
> 
>                                         In Him,
>                                           Joshua Davis
> 
> --
> 
> 
>                      |
>                    -----
>                      |
>                      |          JESUS SAVES LIVES!
>                     / \-------------------------------------\
>                    /   \                                     \
>                   /     \                                     \
>                  /       \                                     \
>                 /         \  Visit "Heaven On Earth Ministries" \
>                /-----------\-------------------------------------\
>                |           |http://www.marietta.edu/~daviso/HOEM/|
>                |  _______  |      ___       ___       ___        |
>                |  |  |  |  |     | _ |     | _ |     | _ |       |
>                |  |  |  |  |     |___|     |___|     |___|       |
>                |  |  |  |  |                                     |
>                |-----------|-------------------------------------|
>                    The Doors Are Always Open To His Church!!!

-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter


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

Date: Sat, 05 Apr 1997 18:16:41 GMT
From: rga@io.com (RGA@IO.COM)
Subject: REQ: help # Need sequential numbers augmented to @variable_name
Message-Id: <3346965c.11730948@news.io.com>

#!usr/local/bin/perl
# Need sequential numbers augmented to @variable_name 


open (FILE, "data.txt");  # get data
@lines = <FILE>;           # put lines in list 


# I need to store each line in <FILE> into 
# a sequentially numbered @new_line

	
  # @new_line1 = split(/#/,$lines[0]);
  # @new_line2 = split(/#/,$lines[1]);
  # @new_line3 = split(/#/,$lines[2]);
        

# but I need Perl to number the new arrays for me

$number = @lines;
$count=0;

   while (++$count <= $number){
	
   @new_line$count = split(/#/,$lines[$count-1]);
	            \  	
		 \__ # append number to array name
           
   }

# I've experimented and browsed through my books
# but sometimes it just save HOURS to ask
# someone who knows :-)

Thanks in advance for your help

	Sincerely, RGA
=============== The Rainbow Garden
http://www.io.com/~rga/rainbow.html
Stories, Parables, Metaphor, Poetry, Quotes.







 


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

Date: 5 Apr 1997 23:40:27 GMT
From: "Jonathan S Hardiman" <emperor@Pathway1.pathcom.com>
Subject: Second Attempt: Multiple Page Perl Scripts???
Message-Id: <01bc4219$da004e40$550ff5cf@jh.dixxonn.on.ca>

Hello,

I'm currently writing a perl script that is to pass information to a
database.
The information is received from our clients via the Web.

I would like to know if it is possible to write this type of thing which
includes multiple webforms with one script, or two?

And also, if I require two, how would I go about sending the information
from the first script, into hidden fields on the second script??

Jonathan S Hardiman
emperor@pathcom.com


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

Date: 5 Apr 1997 23:55:10 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Second Attempt: Multiple Page Perl Scripts???
Message-Id: <5i6oou$stn@fridge-nf0.shore.net>

Jonathan S Hardiman (emperor@Pathway1.pathcom.com) wrote:

: I'm currently writing a perl script that is to pass information to a
: database.
: The information is received from our clients via the Web.

Unless you have a question specific to the Perl language (which almost
all web questions are NOT), please don't post them here; they belong in
comp.infosystems.www.authoring.cgi.

[Responses re-directed to comp.infosystems.www.authoring.cgi Follow-ups set.]

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Sat, 05 Apr 1997 17:54:57 GMT
From: soccer@microserve.net (Geoffrey Hebert)
Subject: simple ? about -e
Message-Id: <5i62mf$3kp$1@news3.microserve.net>

My file does not exist
I coded this.

unless(-e "$output_dir\/r000") {$print_no_binder}   

It returned undefined.  $print_no_binder did not run. Why?

Then I coded this
if (-e "$output_dir\/r000") {
   } else {
   print "does not exist";
}

I know there is some clear understandable way of coding for this
condition.  I thought I had it.  With "unless" it looked nice but did
not work.  With "if" it works, but does not look nice.  I am obviously
missing something simple.  What is it?

Thanks.

(who said perl was easy?)



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

Date: Sun, 06 Apr 1997 03:18:34 GMT
From: tgy@chocobo.org (Tim Gim Yee)
Subject: Re: simple ? about -e
Message-Id: <33471404.25739110@news.seanet.com>

On Sat, 05 Apr 1997 17:54:57 GMT, soccer@microserve.net (Geoffrey
Hebert) wrote:

>My file does not exist
>I coded this.
>
>unless(-e "$output_dir\/r000") {$print_no_binder}   
>
>It returned undefined.  $print_no_binder did not run. Why?

Why should it?  $print_no_binder is just a variable.  Perhaps
&print_no_header?

>
>Then I coded this
>if (-e "$output_dir\/r000") {
>   } else {
>   print "does not exist";
>}

$file = "non_existing_file";
print "$file does not exist!" unless -e $file;


-- Tim Gim Yee             tgy@chocobo.org
http://www.dragonfire.net/~tgy/moogle.html
"Will hack perl for a moogle stuffy, kupo!"


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

Date: Sat, 5 Apr 1997 01:11:38 GMT
From: dkcombs@netcom.com (David Combs)
Subject: Re: skipping around in file being read...
Message-Id: <dkcombsE854nF.HD3@netcom.com>

Question was about getting line before where regex found,
etc.

Nifty program is GNU GREP.  It provides an egrep that
allows not only -w (word mode), 

but also the -A<n> and -B<n> options:

   (gnu) egrep -A2 -B3 regexp files...

will, for every line containing the regex, output not only
that line, but 2 lines After it and the 3 lines Before it.


AND, when there is overlap, IT DOES THE RIGHT THING (not
trivial).

I find this facility SO useful -- maybe others would too --
that MAYBE it should be added as option to the grep cmd
in perl...


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

Date: Sat, 5 Apr 1997 04:57:43 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Khile T. Klock" <klockk@wsadmin2.cv.hp.com>
Subject: Re: Solid Calls
Message-Id: <Pine.GSO.3.96.970405045528.2974E-100000@kelly.teleport.com>

On Thu, 3 Apr 1997, Khile T. Klock wrote:

>   I'm looking into using perl to connect with a remote database using
> the SOLID libraries which are compiled into my version of Perl. Problem
> is I have NO documentation on how to make use of these routines. Does
> anybody have any examples of perl code with SOLID calls?

Maybe you should ask the person who didn't include the documentation when
he or she compiled those calls into Perl.  :-)

Good luck!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

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

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