[7258] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 883 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 18 06:17:19 1997

Date: Mon, 18 Aug 97 03:00:20 -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           Mon, 18 Aug 1997     Volume: 8 Number: 883

Today's topics:
     Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos <ben@remove.this.part.samet.com>
     ANNOUNCE: plug-ins, parse-lexer, generic datasource int kdowney@xline.com
     Re: emacs?  No thank you <KenVogt@rkymtnhi.com>
     Getting a perl script to run with cron <Mark_Cantrell@fws.gov>
     GREAT PRICES ON WEB HOSTING...GOTTA SEE TO BELIEVE, 5me <pcooper@pobox.com>
     Re: GREAT PRICES ON WEB HOSTING...GOTTA SEE TO BELIEVE, <pcooper@pobox.com>
     Re: hel[p (Daniel E. Macks)
     help with this search pattern problem!! <xuchu@iscs.nus.edu.sg>
     How can I read one single character? (Markus Daberkow)
     Re: How do I find the system date/time? (brian d foy)
     Re: How to return to perl from a shell? <rovf@earthling.net>
     Re: How to treat "\n" as "\n" ? (Charles DeRykus)
     ObjStore 1.10 - Bug fix release! <pritikin@mindspring.com>
     Perl Conference presentations on paper? (Honza Pazdziora)
     Re: Q: find my own IP address, not 127.0.0.1 (Michael W. J. West)
     Unix pwd <Michael.Danielsson@ein.ericsson.se>
     URL validation <ben@remove.this.part.samet.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 18 Aug 1997 01:28:29 -0500
From: Ben Sandler <ben@remove.this.part.samet.com>
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <33F7EB8D.1427@remove.this.part.samet.com>

> 5. Have you read the Perl FAQ?  Many questions on sockets programming,
> an important and common problem with Solaris, text manipulation and
> the jargon of perl are answered in the FAQ.  As well as being posted
> regularly to comp.lang.perl.misc, the FAQ is on the web at:
>         http://www.perl.com/perl/nmanual/pod/perlfaq.html
> 
This is no longer the location of the FAQ.  I couldn't tell which FAQ
you meant to be pointing to.

- Ben


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

Date: 17 Aug 1997 23:58:43 GMT
From: kdowney@xline.com
Subject: ANNOUNCE: plug-ins, parse-lexer, generic datasource interface
Message-Id: <5t837j$da9$1@nadine.teleport.com>

I am making 3 modules available thorugh PAUSE; the following is the message to
the modules maintainers, describing all three.

--kd



I have developed a large Perl application (a Cold Fusion-like dynamic Web
page generator written in pure Perl), and since the design is
object-oriented I'd like to make some constituent modules available to the
Perl community. The package as a whole will be released at a later date. It
is used exclusively on UNIX now, but has hooks to be used under any
platform that supports Perl, though all features (DBM support, for example)
may not be available on all platforms).

Mailing list-based support will be added this week. Each module includes
its CPAN code (status, interface, support type, etc.) in parentheses after
the name, as well as a URL at the end of the description.

Developer: Kyle Downey
Email: kdowney@xline.com
URL: http://www.xline.com
Project: to develop a highly-portable and powerful dynamic page generator
for the Web that combines Cold Fusion-like pseudo-tags with server-side
scripting. The system is called Atomik Kafe, and it is currently used to
maintain www.xline.com and www.bikeabout.org. The whole package may be
released under the GPL at a later date.

DLModule/DLMLoader (bdpO): a framework for plug-ins in Perl that takes the
ideas behind AutoLoader and builds an object framework on top of
dynamically-loaded Perl fragments. Supports inheritance and overriding of
plug-in methods.
----> http://www.xline.com/downloads/perl/dlm-1.00b1.tar.gz

PLex (bdp0): Perl Lexer, an object-oriented parse-lex framework. Used to build
a server-side scripting language and HTML template interpreter. Includes
objects to lex, parse, contain namespaces, etc..
----> http://www.xline.com/downloads/perl/plex-1.00b1.tar.gz

DSI/DSource (adp0): An experimental framework that provides the same
object-storage interface (DataSource Interface, DSI) to text files, DBM,
and DBI-based SQL databases. Designed to allow applications to scale
seamlessly from simple text databases to large SQL ones just by changing a
text file. Adds methods to the DBM and text versions to simulate
field-based searching. Currently only DBM support is well-tested and complete.
----> http://www.xline.com/downloads/perl/dsource-1.00a1.tar.gz

Until now this project has been proprietary, so it has not been reviewed in
public, but it has seen active use and development for two Websites. If you
are interested in any of these modules, please contact kdowney@xline.com
and I will put you on the correct mailing list when it's up.




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

Date: Sun, 17 Aug 1997 19:51:30 -0600
From: Kenneth Vogt <KenVogt@rkymtnhi.com>
Subject: Re: emacs?  No thank you
Message-Id: <33F7AAA2.1C33@rkymtnhi.com>

Kevin Lambright wrote:
> 
{snip:  lots of good stuff about the benefits of emacs}

Thank you for all the details, Kevin.  I didn't realize most of them.  I
guess I still go back to the same thing:  why can't emacs be less
cryptic or even (dare I say) visual?  My research (and a lot of comments
from good folks like you) have lead me to believe what I want does not
yet exist.

I come from the PC world, not the Unix world.  I've got yet *another*
learning curve to go through here (Perl is language number 14(!) and
counting).  I'm trying to make this as easy on myself as possible.  Oh
well, I guess this is why we make the big bucks!  (Don't we?)
-- 
      O      O      O       O
     O    O         O     O       Kenneth Vogt
    O  O            O   O
   O     O          O O           KenVogt@rkymtnhi.com
  O        O        O


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

Date: 18 Aug 1997 04:49:14 GMT
From: "Mark Cantrell" <Mark_Cantrell@fws.gov>
Subject: Getting a perl script to run with cron
Message-Id: <01bcab91$ee79d260$6cf49fa4@cantrell>


To all,

I am a novice UNIX type person, attempting to get a perl script to run on a
DG running B1 Trusted DG/UX 5.4R3.10T OS.  I have entered the script using
crontab -e and, while hacking through ED, it gets saved.  The job attempts
to run as I can see by examining the /var/cron/log file however (and there
is always a HOWEVER), the job doesn't run and the log file shows a rc=1
code on the line.  I have even put a ls command instead of my perl script
as the command in cron and it yields the same rc=1.

I realize that this may be a broad question, but does anyone have a clue to
what I might be doing wrong and what I need to do to fix it?  I have been
many directions, and the one that I thought might be close was looking at
the shell (when I saved the crontab job, it said at the bottom of the
screen: WARNING:  Commands will be executed using /usr/bin/sh) but who
knows if that has anything to do with it.  Have read the O'Reilly books -
Armadillo, Camel and Llama, and can't find anything that might steer me in
the right direction.

e-Mail with any ideas would be appreciated.
Mark_Cantrell@fws.gov

Thank you all..


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

Date: Sun, 17 Aug 1997 20:06:35 -0500
From: Patrick Cooper <pcooper@pobox.com>
Subject: GREAT PRICES ON WEB HOSTING...GOTTA SEE TO BELIEVE, 5megs and CGI: $2.00
Message-Id: <33F7A01B.54D66CB3@pobox.com>





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

Date: Sun, 17 Aug 1997 20:14:24 -0500
From: Patrick Cooper <pcooper@pobox.com>
Subject: Re: GREAT PRICES ON WEB HOSTING...GOTTA SEE TO BELIEVE, 5megs and CGI: $2.00
Message-Id: <33F7A1EF.8E845592@pobox.com>

oops...forgot to say something :-)

I'm sorry for adding another commercial posting to your newsgroup but I
feel we are offering a very good deal with our web hosting, only $2.00
for 5 megabytes of space and FULL CGI access. You can find out more
about this offer, and many others, at
http://olivernews.com/discount-space/ .


Patrick Cooper wrote:



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

Date: 18 Aug 1997 05:48:35 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: hel[p
Message-Id: <5t8nnj$1pa$1@netnews.upenn.edu>

Brian P. Moffatt (mudd97@nac.net) said:
: How can I test perl scripts on my win95 machine.

Why don't you try running them? Or is that not the kind of test you
had in mind? There's a win95 perl port. A DejaNews search of this
newsgroup would give you a pointer to it, as would the FAQ. You might
have a look at http://www.perl.com/CPAN

dan

-- 
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks



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

Date: 18 Aug 1997 03:10:27 GMT
From: Xu Chu <xuchu@iscs.nus.edu.sg>
Subject: help with this search pattern problem!!
Message-Id: <5t8ef3$cdn@nuscc.nus.sg>

I am badly in help for this search pattern matching problem. i wanna extract the url link address from a file obtained from 
altavista search results. the file is like this:

<html><head>
<title>Altavista Simple Query Perl
</title></head>
About <b>66666</b>  documents match your query<br><pre>
 1.<a href="http://www.perlbook.com/" target="other"> Applied Perl</a> 21-May-97 Some Introductions
 2.<a href="http://www.perl.com/">Perl</a> An Example only
</pre>
</html>

what i write is:
	open(FP1,"infile");
	while(<FP1>) {
	 die "unknown format for $_"
	  unless s#^[\s\S]*<pre>\n((<a href=.*\n)*)</pre>[\s\S]*$#$1#is;
	 print;
	}
	close(FP1);

i think the 's' in the search pattern can deal the whole file as a single line but failed. the above program died 
immediately at the first line of the file. can anyone tell me what's wrong with my problem and how to make it run properly?

thx.

-- 
wings
------
You cannot learn anything unless you almost know it already.



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

Date: 18 Aug 1997 08:55:49 GMT
From: daberkow@bln.sel.alcatel.de (Markus Daberkow)
Subject: How can I read one single character?
Message-Id: <5t92ml$55q$1@slbh00.bln.sel.alcatel.de>


Hi,

a simple question from a newbie:

How can I read one single char from STDIN? I don't want to press the 
return key after typing that char.

Any ideas?

Thanks in advance

Markus
--
Markus.Daberkow@bln.sel.alcatel.de
daberkow@hotmail.com


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

Date: Sun, 17 Aug 1997 21:20:47 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: How do I find the system date/time?
Message-Id: <comdog-ya02408000R1708972120470001@alice.walrus.com>

In article <33F760F9.5AA48E57@wwwebspace.co.uk>, David Anderson <IMS@wwwebspace.co.uk> wrote:

>I'm writing a CGI script but don't know any commands to find the system
>date/time. Can anyone help?

how about

   man perlfunc | grep time

which turns up several possibilities, including

   gmtime
   localtime
   time

obscure names, but they might do what you want ;)

-- 
brian d foy                                   <comdog@computerdog.com>



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

Date: 18 Aug 1997 09:35:38 +0200
From: Ronald Fischer <rovf@earthling.net>
Subject: Re: How to return to perl from a shell?
Message-Id: <xz2k9hkx7sl.fsf@uebemc.siemens.de>

>>>>> On Fri, 15 Aug 1997 16:30:02 -0500
>>>>> "KT" == Kerr Tung <kerr_tung@sdt.com> wrote:
KT> In my perl program, I have a system call to ClearCase setview command
KT> which spawns a shell. How do I have it automatically exit the shell and
KT> return back to my perl program to execute the commands followed?
Hard to recommend anything, without seeing some code. I don't suppose
that you are  doing a
    system "cleartool setview xxx"
since this would not make much sense. Most likely, you are shelling
out to a script that does a setview, and then you are stuck in the
subshell. In this case, I suggest that you use startview instead of
setview.

Ronald
-- 
Ronald Fischer (rovf@Earthling.net) (PGP public key available)
http://ourworld.compuserve.com/homepages/ronald_fischer/
[When posting a followup, mailing a courtesy copy is fine, provided it is 
clearly marked as such.]


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

Date: Mon, 18 Aug 1997 00:16:57 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: How to treat "\n" as "\n" ?
Message-Id: <EF324A.MM@bcstec.ca.boeing.com>

In article <5snkqs$lj3$1@news.cs.tu-berlin.de>,
Thomas Bahls <thommy@cs.tu-berlin.de> wrote:
 > hello,
 > 
 >  I am looking for a function that does the opposite of quotemeta; I
 > want Perl to interprete <backslash> <n> (two chars) as carriage
 > return.
 > 
 > How can I do this?
 > 
 > 	example:
 > 
 > 		$a= 'This is the first line.\n"Nope!"';
 > 		print $a
 > 
 > 	results:
 > 		This is the first line.\n"Nope!"
 > 
 > 
 > 	but I want:
 > 		This is the first line.
 > 		Yes!
 > 		
 > 
 > The task sounds soooo easy, but I have not found a way to do this
 > :-(
 > 
 > anybody?
 > 


Here're a couple of possibilities:

  print do { $a=~s/\\n/\n/; $a};


or if you don't want to alter $a:


  print join "\n", split /\\n/, $a;


HTH,
--
Charles DeRykus
ced@carios2.ca.prune_out.boeing.com


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

Date: 17 Aug 1997 23:56:24 GMT
From: Joshua Pritikin <pritikin@mindspring.com>
Subject: ObjStore 1.10 - Bug fix release!
Message-Id: <5t8338$d9g$1@nadine.teleport.com>

Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
ObjStore       Rm+O  ObjectStore OODBMS Interface                 JPRIT

Interface to ObjectStore OODBMS (http://www.odi.com).  Stores scalars,
sets, hashes, and references directly in the database without
flattening nested or circular structures.  Databases can be accessed
from Perl, C++, or Java.  Designed for easy extension of the internal
data representation or data types of built-in data structures.  Uses
the virtual memory mechanism to make read/write access nearly as fast
as memory mapped files.

Available via http://www.perl.com/CPAN/modules/by-module/ObjStore

           << This is the relational database killer app! >>


Perl-ObjectStore mailing list:

majordomo@parallax.co.uk   "subscribe perl-objectstore
you@your.company.com"


see ./INSTALL for installation instructions
see ./TODO for list of things to do
see ./CHANGES for a historical perspective


### FUTURE PLANS ###

Preliminary design of Verity full text indexing interface below.  Should
the index membership be kept in each member or not?  Leaning towards
'no'.

$Txt->index($indexHandle, $userPointer)
	$indexHandle - the specific Verity index object
	$userPointer - returned together with the match score after a search

  This can be called multiple times for different indexes.  The OSSV
will
  keep track of the indexes to which it has been added?

$Txt->reindex;                   # called if string is changed
$Txt->unindex([$indexHandle]);   # called upon destruction


### RECENT CHANGES ###


** 08-11-97 Released 1.10

- Overloaded the '""' (stringify) operator for persistent objects.

- ospeek [-addr]

- Important typemap fixes plus other minor stuff.


** 08-06-97 Released 1.09

- At our site we are now using osperl for about 2GB worth of data!

- Now built to a shared library!!  Anyone up for
Apache/Perl/ObjectStore?

- New, Improved Documentation.

- Persistent blessings now fully tested and working.

- ObjectStore transactions and exceptions now fully integrated into
Perl.  Cursors have been removed from persistent data; read_only
transactions now properly supported.  Read_only transactions are
blazingly fast!

- Regularized allocators.  Specify cardinality when creating containers.
  new ObjStore::$type($near, $card);  Customize representation selector.

- Regularized peristent typing in preparation for extensibility.

- Peek rewrite with ideas from Data::Dumper.  Peek on circular data
structures.  Peek reports percent utilization to the delight of the
accountants everywhere.

- Unions removed from the schema.  This major fix makes it possible to
evolve databases in the event of future schema enhancements.

- Reference counts are now 32bits wide and check for overflow.

- Static functions (e.g. ObjStore::Segment::of) are now called with ::
instead of -> for greater efficiency.

- Plus hundreds of fixes...




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

Date: Mon, 18 Aug 1997 07:07:42 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Perl Conference presentations on paper?
Message-Id: <adelton.871888062@aisa.fi.muni.cz>

Hallo,

I will be coming to the U.S. this week, unfortunately few days late to
catch the Perl Conference. Will there be any publication with the
presentations from Perl Conference? I would really like to bring
something exciting about Perl to Europe. I will be travelling from NYC
to California -- where should I ask?

Thanks for your time.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
    European RC5 56 bit cracking effort -> http://www.cyberian.org/


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

Date: 16 Aug 97 12:54:27 GMT
From: westmj@universal.dca.net (Michael W. J. West)
Subject: Re: Q: find my own IP address, not 127.0.0.1
Message-Id: <33f5a303.0@news.dca.net>

even fixing $name for $host (a bug in the faq)
the same thing happens.  My machine name as retrieved by the script 
is 'mklinux', not a dotted name, and for the script that does not
compute, so I get the 127.0.0.1 for the local host.

Any suggestions?

>From netstat, I found my connection name was modem014.magpage.com,
and I could successfully use perl to find the IP number is
209.179.92.64, but I can not get the script to find out where my modem
goes without help.

Michael W. J. West (mwest@nyx.cs.du.edu) wrote:

> How can I use perl to figure out my (single session ISP-assigned PPP) 
> IP address as known to the outside world?  (This is needed so that the 
> outside world can contact my Apache server when I am on-line.)

> The faq suggests: 

> "The Sys::Hostname module (part of the standard perl distribution) will 
> give you the hostname after which you can find out the IP address 
> (assuming you have working DNS) with a gethostbyname call. 

>     use Socket;
>     use Sys::Hostname;
>     my $host = hostname();
>     my $addr = inet_ntoa(scalar(gethostbyname($name)) || 'localhost');
> "

> However, that simply tells me that my IP is 127.0.0.1 !  
> That is my loopback, but not the IP for Apache as viewed 
> by the outside world.

> Perhaps as a novice, I set up the loopback wrong?  But I can typically
> get the right info from 'netstat', however I would rather not parse that
> if there is an easier way.

> Regards, Mike West mwest@nyx.net



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

Date: Mon, 18 Aug 1997 08:48:31 +0200
From: Michael Danielsson <Michael.Danielsson@ein.ericsson.se>
Subject: Unix pwd
Message-Id: <33F7F03F.3FAD@ein.ericsson.se>

I would like to check if i am standing in the directory /tmp. How do I
do this in perl.


/Michael
-- 
----------------------------------------------------------------------
Michael Danielsson          tfn:    +46 54 29 43 64
Ericsson Infotech AB        fax:    +46 54 29 40 01
Box 1038
S-651 15 KARLSTAD           memo: (Ericsson internal) ERI.EIN.EINMIDA
SWEDEN                      mailto:Mikael.Danielsson@ein.ericsson.se
----------------------------------------------------------------------


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

Date: Mon, 18 Aug 1997 01:24:39 -0500
From: Ben Sandler <ben@remove.this.part.samet.com>
Subject: URL validation
Message-Id: <33F7EAA7.7E7A@remove.this.part.samet.com>

How can I look up a URL from a [command line] Perl script to see if it
is valid?

- Ben
Please mail and post - thanks!


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

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

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