[6363] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 985 Volume: 7

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 21 01:17:12 1997

Date: Thu, 20 Feb 97 22:00:19 -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           Thu, 20 Feb 1997     Volume: 7 Number: 985

Today's topics:
     Re: backreferences in a character class? (Kevin Buhr)
     Re: backreferences in a character class? (Dave Thomas)
     Re: Choosing the best method for finding an item on a l (Tad McClellan)
     Re: Determine perl program memory usage (Ilya Zakharevich)
     Re: efficiency with while? (Dave Thomas)
     Re: efficiency with while? <eryq@enteract.com>
     Re: efficiency with while? (Dave Thomas)
     Re: escaping quotes/#? <webmaster@surewould.com>
     How can I use LWP.pm on Perl5 for win32 ? ("Cho, kwangje")
     Re: How to send two HTML pages from a CGI script <eryq@enteract.com>
     Re: html -> text (Brooks Davis)
     I'm a Win95 user (sorry) and I have 3 questions . . . <webmaster@surewould.com>
     Re: modifying @INC <mgjv@comdyn.com.au>
     Named Pipes and Perl, anyone done this? <humphric@akcity.govt.nz>
     Re: NT and perl (Bradley J. Marker)
     Perl Mail Client? (Mark Frost)
     Re: Perl on Windows 95 (Paul Delys)
     Re: Perl Sockets reprise msosteri@yesic.com
     PERL/NT development environment/guru setup out there ? (Gary)
     Re: PERL/NT development environment/guru setup out ther (Dave Thomas)
     Re: perl5 port problem (Ilya Zakharevich)
     Reading files (Greg Aloi)
     Regex to parse RFC822 header? (Jason C Austin)
     relationship between @INC & PERL5LIB w.r.t. module load (Silvio Picano)
     Running other program .. (Meor Yahaya)
     Savvy Newsgroup Monitors - Please Help :-) <jbadger@hooked.net>
     status print not printing until output (Richard S. Guse)
     Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)

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

Date: 20 Feb 1997 20:52:57 -0600
From: buhr@stat.wisc.edu (Kevin Buhr)
Subject: Re: backreferences in a character class?
Message-Id: <vba7mk2ooom.fsf@mozart.stat.wisc.edu>

Brett Denner <dennerbw@lmco.lmtas.com> writes:
>
> Can I use a backreference in a character class?

No.

But first, you have your backreference syntax wrong.  You must use
"\1" in place of "$1".  "$1" refers to a substring of the last
*completed* match, as in:

	if(/foo(.)bar/) { print "Hey, there's a '$1' in my foobar!\n"; }

or:

	s/foo(.)bar/foobar$1/go;  # move that character to the end

"\1" is used for backreferences---references in a regular expression
to parts of the string matched by earlier parts of the *same* regular
expression.

However, even if you get the backreference syntax right, you still
can't use it in a character class.  The regular expression [^\1]
matches any character that isn't ^A (i.e., because backreferences
can't appear in character classes, "\1" is interpreted as a character
in octal notation).  Worse yet, the regular expression [^$1] does
something even more unexpected: the value of "$1" from the *previous*
completed match is substituted into the character class, and *those*
characters become the ones that won't be matched (assuming "$1"
doesn't contain a "]", which would cause even more bizarre behavior).
Long live Perl.

			*	*	*

ANYWAY, for your particular case, might I suggest:

	$_ = q/ "Hi, 'Fred', or whoever you are." /;
	/(["'])(.*?)\1/ and $string = $2;
	print "$string\n";

See, ".*?" is a "nongreedy" version of ".*"---it will stop sucking up
characters as soon as it can, instead of sucking up characters until
it can't suck up any more.  For example, it will correctly handle:

	$_ = q/ "Hi, 'Fred', or whoever you are."  "Get lost," said Fred. /;

That is, it will do the same thing that /(["'])([^\1]*)\1/ would do, if
backreferencing actually worked in character classes.

Kevin <buhr@stat.wisc.edu>

P.S.  Of course, if you were expecting to correctly handle:

	$_ = q/ Tim's response was, "Don't do that!" /;

or worse yet:

	$_ = q/ I repeated, "She said, 'Tim screamed, "Stop!"'" /;

you'll need something a lot more complicated.


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

Date: 21 Feb 1997 03:30:49 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: backreferences in a character class?
Message-Id: <slrn5gq5i6.ohc.dave@fast.thomases.com>

On Thu, 20 Feb 1997 17:36:58 -0600, Tad McClellan <tadmc@flash.net> wrote:
> --------------
> #! /usr/bin/perl -w
> 
> $_ = q/ "Hi, 'Fred', or whoever you are." /;
> 
> /(["'])([^\1]*)\1/ and $string = $2;
> print "$string\n";
> 
> 
> # quoted the other way around
> $_ = q/ 'Hi, "Fred", or whoever you are.' /;
> 
> /(["'])([^\1]*)\1/ and $string = $2;
> print "$string\n";
> --------------
> 
> 
> It does what he wanted...

But only because /(['"][^\1]*\1)/ is effectively identical to
                 /(['"].*\1/
		 
Both will match his particular example OK. But the [\1] isn;t doing what you
think it is...
 
> Hmmm. I dunno. Does Jeffrey's book say when it happens? I still
> haven't managed to get a copy.

I seem to remember you're our west - the Borders in Lewisville had many
copies.


> : However, this approach (and the original) won't work with escape characters
>                           ^^^^^^^^^^^^^^^^
> 
> ???

By that I mean that none of the postings deal with

   "I said \"hello\""
   
and the like.

You can do a complete job using regexs, but it ain't pretty.

Dave


-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Thu, 20 Feb 1997 22:49:31 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Choosing the best method for finding an item on a list.
Message-Id: <rg9je5.ih6.ln@localhost>

Alexandre Bento Freire (hawk@ip.pt) wrote:
: I need to decide the best to find an item on a list.

:  As far as I kwnon, I can use:
:   1. for () if
:   2. grep
:   3. Associative array. 

:  The 1st seems me the faste one, but require more code.


On the average, you will have to search through half of the list
to find what you're looking for. Not so good for large lists.


:  The 2nd doesn't stop, after finding.


It searchs the whole list. Worse yet, 'tis true.


:  The 3rd requires hashing, witch creates an overhead.


But, _way_ less overhead than searching half the list, for 
large lists.

The hashing data structure (it's a general CS term, you know,
it is not specific to perl) was developed because it is generally
a good balance (with an appropriate hashing function) of
space/speed/efficiency tradeoffs.

That's likely why Larry put it in there ;-)

Why not just run Benchmark on some of your real data, and find
out for sure what's faster for your application?


:  The best solution would be a stoping grep, after finding.

I don't think that's the best solution...


:  Or a method of using Associative array that didn't hast
:  the all array.

:  Many times, I just want to know, if the string is there, without
:  caring is index on the list.

:  Could you give me some pointers, and identifing if also runns on perl 4.
:  'On some machines I have to use perl 4'.


I'd just go with a hash if I were you. If hashing isn't good enough,
then you have a truly industrial strength problem, and it would be
time to read about how to bound algorithms (not easy or fun, you
_really_ don't want to have to go through that pain).


Sorting is the standard fodder of any class on evaluating algorithms.

It has been studied to death.


This is like "Sorting 100" (that is the class _before_ "Sorting 101"  ;-)

We haven't talked about any of these well known sorting algorithms:

binary sort
bubble sort 
quick sort
heap sort
bucket sort
radix sort
 ...


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


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

Date: 21 Feb 1997 02:11:07 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Determine perl program memory usage
Message-Id: <5ej07r$o09$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to 
<mg@obd.com>],
who wrote in article <856450932.31102@dejanews.com>:
> Is it possible to determine the amount of memory a perl program
> is using? 

With recent enough perl's use
	env PERL_DEBUG_MSTATS=2 perl your_program
(assuming you use perl's malloc).

> I have a long running program that seems to consume
> more memory that I would expect and want to determine the
> memory usage a various points in the program.  

To do the above in arbitrary moment you need Devel::Peek.

Ilya


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

Date: 21 Feb 1997 03:18:52 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: efficiency with while?
Message-Id: <slrn5gq4rs.ohc.dave@fast.thomases.com>

On Thu, 20 Feb 1997 16:19:17 -0500, Ying Chen <yingchen@fir.fbc.com> wrote:
> Hi all -
>  
> Stil pretty new to perl programming -
> Can someone suggest something more efficient than
> doing something like this:
> 
> open (FILEIN, $very_large_file_name);
> 
> while (<FILEIN>) {
>    @lines = (@lines, $_);
> }

Would you believe

   @lines = <FILEIN>;
   
Gotta love Perl, eh?


However, efficiency is relative. If you're going to max out memory reading
in the file, then you might want to read it into a scalar, rather that a
list (more space efficient) or read and process it in chunks (considerably
more space efficient, but more defficult to code).

Regards

Dave


-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Thu, 20 Feb 1997 21:55:37 -0600
From: Eryq <eryq@enteract.com>
To: Dave@Thomases.com
Subject: Re: efficiency with while?
Message-Id: <330D1CB9.1ECCE5F8@enteract.com>

Dave Thomas wrote:
> 

> Would you believe
> 
>    @lines = <FILEIN>;
> 
> Gotta love Perl, eh?
> 
> However, efficiency is relative. If you're going to max out memory reading
> in the file, then you might want to read it into a scalar, rather that a
> list (more space efficient) or read and process it in chunks (considerably
> more space efficient, but more defficult to code).

Is it really more space efficient?  I had always assumed that scalars 
were continguous in core, although I've never peeked into the Perl source
code enough to find out.  If they *are* contiguous blocks of core, then 
reading stuff into arrays of lines might be easier on your system, since 
it isn't be asked to realloc larger and larger contiguous chunks of core
(some OS's have limits on how large a malloc'ed chunk can be).

If, however, big scalars are implemented internally using something like a 
linked list (or array) of memory chunks, then I'd assume little difference between
the two file-reading approaches (accumulate into an array vs. slurp into a scalar). 
 
But a Perl internals wizard could clear this up.  :-)

-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@enteract.com)
 / _ \| '_| | | |/ _ ' /  Hughes STX, NASA/Goddard Space Flight Cntr.
|  __/| | | |_| | |_| |   http://www.mcs.net/~eryq
 \___||_|  \__, |\__, |__
           |___/    |___/ Make $$$ easy! Just hit shift, then 444!


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

Date: 21 Feb 1997 05:07:27 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: efficiency with while?
Message-Id: <slrn5gqb7d.rf2.dave@fast.thomases.com>

On Thu, 20 Feb 1997 21:55:37 -0600, Eryq <eryq@enteract.com> wrote:
> Dave Thomas wrote:

> >    @lines = <FILEIN>;

> > However, efficiency is relative. If you're going to max out memory reading
> > in the file, then you might want to read it into a scalar, rather that a
> > list (more space efficient) or read and process it in chunks (considerably
> > more space efficient, but more defficult to code).
> 
> Is it really more space efficient?  I had always assumed that scalars 
> were continguous in core, although I've never peeked into the Perl source
> code enough to find out.  If they *are* contiguous blocks of core, then 
> reading stuff into arrays of lines might be easier on your system, since 
> it isn't be asked to realloc larger and larger contiguous chunks of core
> (some OS's have limits on how large a malloc'ed chunk can be).

Well, slurping in the emacs NEWS file (250k) increased my perl programs size
by:

   scalar:  ~300k
   
   array:   ~800k

Seems to me you're looking at either a number of reallocs (one per input
chunksize), or a whole heap of allocs (one per line) plus the additional
overhead. I'm happy to be proven wrong, but I can't think of any virtual
memory systems in which the former isn't better (particularly given the
almost 3-to-1 difference in resident size).

Dave

-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: Fri, 21 Feb 1997 00:27:16 -0500
From: Chris <webmaster@surewould.com>
Subject: Re: escaping quotes/#?
Message-Id: <330D3234.1DBA@surewould.com>

Escaping the quotes should work fine. I used

print "<body bgcolor=\"#FFFFFF\">\n";

and it did the trick.

(By the way, I've started using single quotes with all my HTML coding;
it removes lots of these kinds of annoyances, from Perl to Visual Basic.
But I don't know if singe quotes are standard HTML, now that I think
about it, so I can't exactly recommend it.)

Go Get 'em!
Chris

-- 
 ~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~
|@                                      ^|
|            Sherwood Design             |
|        http://www.surewould.com        | 
|~                                      #|
 ~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~




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

Date: Fri, 21 Feb 1997 11:48:47 -0000
From: kwangje@203.239.112.2 ("Cho, kwangje")
Subject: How can I use LWP.pm on Perl5 for win32 ?
Message-Id: <199702210350.MAA19431@rose.handy.co.kr>

I need parsing and retrieving info. from HTML, how can I do for it ?
Anyone knows information related on this.
Thanks ...

-- kwangje --



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

Date: Thu, 20 Feb 1997 21:46:00 -0600
From: Eryq <eryq@enteract.com>
To: jringrose@worldnet.att.net
Subject: Re: How to send two HTML pages from a CGI script
Message-Id: <330D1A78.69CFC5DF@enteract.com>

This isn't a Perl question; it's a CGI question.
You want to read up on outputting documents of type
multipart/x-mixed-replace.  That will get you what you want.

Further help at comp.infosystems.www.authoring.cgi.
Good luck,
  
-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@enteract.com)
 / _ \| '_| | | |/ _ ' /  Hughes STX, NASA/Goddard Space Flight Cntr.
|  __/| | | |_| | |_| |   http://www.mcs.net/~eryq
 \___||_|  \__, |\__, |__
           |___/    |___/ Make $$$ easy! Just hit shift, then 444!


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

Date: 21 Feb 1997 02:54:34 GMT
From: brdavis@orion.ac.hmc.edu (Brooks Davis)
Subject: Re: html -> text
Message-Id: <5ej2pa$3ra$1@cinenews.claremont.edu>

[An e-mail copy of this message was sent to travler@io.com]

Dataweaver (traveler@io.com) wrote:
: Please email a copy of any responses to me.  
: 
: I am attempting to write a perl script that converts an html document into
: a plain-text document; I intend to do more than just strip out the tags;
: for example, i am using s/<hr\s*>/-----/i in the script.  
: 
: My two biggest problems right now have to do with the text layout; how
: would I tell the script to insert \n's after every seventy-ninth character
: in a line, and how would I go about formatting tables so that they're
: readable?

Why don't you just use the HTML::FormatText module on CPAN?  Or if you
really want to write your own, base it on the HTML:: modules since and
improve them since if you are going to reinvent the wheel, yours really
should be better.

-- Brooks

--
Brooks Davis            +------------------------------------------------+
brdavis@hmc.edu         | "_Slackware_ [Linux] is the MacOS of UNIXes."  |
Harvey Mudd College     |                    -- Richard Garnish          |
340 E. Foothill Blvd.   |                       on alt.sysadmin.recovery |
Claremont, CA 91711     +------------------------------------------------+


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

Date: Fri, 21 Feb 1997 00:27:37 -0500
From: Chris <webmaster@surewould.com>
Subject: I'm a Win95 user (sorry) and I have 3 questions . . .
Message-Id: <330D3249.7D9C@surewould.com>

1. How can I call a C routine from a Perl routine (assuming I'm writing
both & using VC++ 4.0 for the C part)?

2. Can I use sockets in Perl?

3. I forget.


-- 
 ~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~
|@                                      ^|
|            Sherwood Design             |
|        http://www.surewould.com        | 
|~                                      #|
 ~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~~*~~~~



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

Date: Fri, 21 Feb 1997 12:12:08 +1100
From: Martien Verbruggen <mgjv@comdyn.com.au>
Subject: Re: modifying @INC
Message-Id: <330CF668.6C96@comdyn.com.au>

Bill Kuhn wrote:

> # $ENV{SERVER_PORT} is set
> $incpath = '/home/cgi-lib.' . $ENV{SERVER_PORT} ;

[...]

> 
> When I try to compile the above it fails.  It tried to
> push(@INC,$incpath) but the same results were obtained.
> 
> If I print "@INC" it appears modified as I requested, but I can't seem
> to use modules in the new include path.

is the path really /home/cgi-lib. (note the ending '.')? That would be:

/home/cgi-lib./module.pm

try something like:

foreach ( @INC ) {
  print STDERR "Searching $_\n";
  if ( -f "$_/module.pm" ) {
    print STDERR "Found it in $_\n";
    last;
  }
}

That at least might give you an idea if perl can actually find it, and
what it actually searches.

-- 
Martien Verbruggen

Webmaster www.tradingpost.com.au
Commercial Dynamics Pty Ltd, N.S.W., Australia


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

Date: Fri, 21 Feb 1997 02:57:06 GMT
From: Craig Humphrey <humphric@akcity.govt.nz>
Subject: Named Pipes and Perl, anyone done this?
Message-Id: <330D0F02.51E1@akcity.govt.nz>

Hi People,
	in the never ending quest for info on Perl and the various ways to use
it as the goo between our Netscape Communications WWW server and our MS
SQL Server (6.5), I was wondering if anyone had any ideas on how to to
use named pipes in Perl (I have 5.something).

I'd heard that it was possible.  Has anyone managed it?  If so, care to
give me some pointers, even if it's just to online docos.

Thanks.

Later'ish
Craig

-- 
usagi@ihug.co.nz                    | My views and opinions are barely
humphric@akcity.govt.nz             | my own, let alone that of my
usagi@ibm.net                       | employer or ISP!
http://homepages.ihug.co.nz/~usagi  | "Come to Butt-Head" - Butt-Head


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

Date: 21 Feb 1997 02:20:36 GMT
From: bmarker@cco.caltech.edu (Bradley J. Marker)
Subject: Re: NT and perl
Message-Id: <5ej0pk$q1d@gap.cco.caltech.edu>

Get a program like sendmail (I forget where you can get it but it is free) and 
you can do almost the same thing as you did on Unix.

Bradley J. Marker


In article <330C310D.595F@prestel.net>, Iqbal Gandham <igandham@prestel.net> 
writes:

>Hi
>
>I am not very familiar with NT server, but can write effectively in perl
>Now I have asimple mailing scripts which works perfectly on a apache
>server. How can I adopt this so that it will run on a NT server.
>
>In unix I can just use th Mail command, is there something similar in NT
>
>Thanks
>
>Iqbal
>igandham@prestel.net
>



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

Date: 20 Feb 1997 22:50:09 -0500
From: mfrost@atlas.horizsys.com (Mark Frost)
Subject: Perl Mail Client?
Message-Id: <5ej61h$9d6$1@atlas.horizsys.com>


I was wondering if anyone has written a perl mail client.

Since I see so many nifty libraries to assist in such an endeavor (MIME,
Mail Tools, and even PerlTk) I was thinking that someone must have made
such a beast.

Thanks

-mark


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

Date: 21 Feb 1997 00:20:33 GMT
From: paul@gi.alaska.edu (Paul Delys)
Subject: Re: Perl on Windows 95
Message-Id: <5eipoh$qnd@news.alaska.edu>

In article <3308E0D4.371F@cougar.netutah.net>, mdperry@cougar.netutah.net 
says...
[snip...]
>I would like to also see how it works by loading the page into Netscape
>locally and then running the script (like it would on a server).  Is
>this possible.  When I tried clicking on the button that calls the
>script nothing happened.  

I do this all the time on my machine. What you need is to run an HTTP server on 
your local Win95 machine. I use OmniHTTPd, a freeware server that supports SSI, 
standard cgi, and win-cgi. It's available from 

       http://www.fas.harvard.edu/~glau/httpd/

I've been running it for a month or so, mostly with the win-cgi, but I have 
also run a few perl5 for win32 scripts through just for fun.

You can easily find other free- and commercial-ware through the TUCOWS software 
archive: http://www.tucows.com/

HTH,

Paul Delys
paul@gi.alaska.edu



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

Date: Thu, 20 Feb 1997 20:21:04 -0600
From: msosteri@yesic.com
Subject: Re: Perl Sockets reprise
Message-Id: <856491066.26414@dejanews.com>

In article <8csp2r8pq4.fsf@gadget.cscaper.com>,
  Randal Schwartz <merlyn@stonehenge.com> wrote:
>
> >>>>> "msosteri" == msosteri  <msosteri@yesic.com> writes:
>

> So yes, the [0] is quite necessary.

Got it. Thanks
>
> I'm trying to recall Perl history... but I think *I* was the one
> responsible for this hack.  Nice. :-)

Not trying to step on anyones toes but in the header it is clearly
attributed to Tom Christiansen (sorry about the spelling Mr. C but I
never was good at bees). Its a nice hack whoever wrote it  and running
through it taught me allot about sockets. I tried to change it as much as
possible but I ended up "copying" much of the original coding. Not smart
enough to find a better way (or maybe there is no better way). Just
getting it to work under Windows 95 (puke) was a learning experience.

What's that ole saying about imitation being the sincerest form of
flattery

thanks again,

mike
>
> print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
> ## legal fund: $20,495.69 collected, $182,159.85 spent; just 558 more days
> ## before I go to *prison* for 90 days; email fund@stonehenge.com for details
>
> --
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
> Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
> Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
> Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
> Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Fri, 21 Feb 1997 03:45:19 GMT
From: gniemcew@dti.net (Gary)
Subject: PERL/NT development environment/guru setup out there ?
Message-Id: <330d1891.3353662@news.alt.net>

Hi !

It's probably a "dream on!" type of question, but here it goes anyway:
is there an integrated development environment for PERL/NT4/Win95 ? I
am thinking a nice (color coding) editor in one window, interpreter
stdout in another, and still a script's output in yet another ? PERL
debugger with variable trace ?

And yes, I want that voice recognition thing too ! :-)

I would appreciate your recommendations,

Thanks,

Gary



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

Date: 21 Feb 1997 05:10:50 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: PERL/NT development environment/guru setup out there ?
Message-Id: <slrn5gqbdq.rf2.dave@fast.thomases.com>

On Fri, 21 Feb 1997 03:45:19 GMT, Gary <gniemcew@dti.net> wrote:
> Hi !
> 
> It's probably a "dream on!" type of question, but here it goes anyway:
> is there an integrated development environment for PERL/NT4/Win95 ? I
> am thinking a nice (color coding) editor in one window, interpreter
> stdout in another, and still a script's output in yet another ? PERL
> debugger with variable trace ?

well, emacs comes close. But it ain't what you'd call a drag'n'drop user
interface!

I use it daily on NT 

Dave


-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 21 Feb 1997 02:19:15 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl5 port problem
Message-Id: <5ej0n3$o09$2@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Fred Condo
<fred@lightside.net>],
who wrote in article <fred-2002971018000001@dcs75.dcs-chico.com>:
> I recently built the perl5 port under FreeBSD 2.1.6.1, and perl displays

There is no such thing as perl5. Regarding the rest, set
PERL_BADLANG=1.
	man perllocale

Ilya


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

Date: 20 Feb 1997 21:04:40 -0800
From: galoi@sdcc13.ucsd.edu (Greg Aloi)
Subject: Reading files
Message-Id: <5ejad8$scc@sdcc13.ucsd.edu>


Hi, 

  I am new to perl and have a question about reading from files. 

  I want to be able to read in a file filled with strings in the
following form

	string1
	string2
	string3
	string4
	string5
	string6
	  .
	  .
	  .

I want to be able to read in the strings line by line and either
make an assignment to them or skip over them.  One method that I
thought might work was to assign diferent variables to each string
as I read them in

for example

    while(<DATA_IN>)
    {
	$string1 = $_;
	$string2 = $2;
		.
		.
		.
    }

but this does not get me the desired effect.  

If anybody knows of any tricks to do this I would be really
grateful.  Like I said before, I am new to perl and am not familiar
with all its magic.


					---greg---
					galoi@sdcc13.ucsd.edu



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

Date: 19 Feb 1997 20:09:56 GMT
From: jason@wisteria.cs.odu.edu (Jason C Austin)
Subject: Regex to parse RFC822 header?
Message-Id: <JASON.97Feb19150956@wisteria.cs.odu.edu>


	Has anyone come up with a regex to parse an RFC822 mail
header?  The simple "field-name: field-body" form is easy enough but
how about handling folded lines?  A field record can be on any number
of lines as long as a white space follows each carriage return.

	In this particular instance, I have the entire header in a
scalar and want to extract the field-body given a field-name.  It
works fine now with a split and an iteration, but it seems like it
ought to be possible with one regex.  Any ideas?
--
Jason C. Austin
austin@visi.net



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

Date: 21 Feb 1997 01:49:37 GMT
From: spicano@ptdcs2.intel.com (Silvio Picano)
Subject: relationship between @INC & PERL5LIB w.r.t. module loading?
Message-Id: <5eiuvh$g8g@ptdcs5.ra.intel.com>

I've installed DataDumper down a personal path, outside the perl
installation tree. Now I though that adding paths into @INC was
enough to find these modules, but I cannot get them to load thru
@INC:


--- fails to find modules ---
[1] unsetenv PERL5LIB
    perl
    push @INC, '/usr/guest/spicano/lib/perl5/site_perl/rs_aix325';
    push @INC, '/usr/guest/spicano/lib/perl5/site_perl';
    use Data::Dumper;
    Can't locate Data/Dumper.pm in @INC at - line 3.
    BEGIN failed--compilation aborted at - line 3.

    perl -le 'print join $/, @INC'
    /usr/intel/96r1/lib/perl5/rs_aix325/5.002
    /usr/intel/96r1/lib/perl5
    /usr/intel/96r1/lib/perl5/site_perl/rs_aix325
    /usr/intel/96r1/lib/perl5/site_perl
    .


--- find modules ---
[2] setenv PERL5LIB \
      /usr/guest/spicano/lib/perl5/site_perl/rs_aix325:/usr/guest/spicano/lib/perl5/site_perl
    perl
    use Data::Dumper;
    (attempts in the man page work).


    perl -le 'print join $/, @INC'
    /usr/guest/spicano/lib/perl5/site_perl/rs_aix325
    /usr/guest/spicano/lib/perl5/site_perl
    /usr/intel/96r1/lib/perl5/rs_aix325/5.002
    /usr/intel/96r1/lib/perl5
    /usr/intel/96r1/lib/perl5/site_perl/rs_aix325
    /usr/intel/96r1/lib/perl5/site_perl
    .



I am pushing the 2 new paths into @INC, but cannot load Data::Dumper this
way? [I also tried to "unshift" onto @INC, w/o success.]


Any ideas on why I cannot load thru @INC? I really do not
want to use PERL5LIB.

Thanks.
Silvio


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

Date: 21 Feb 1997 01:59:05 GMT
From: meory@seas.gwu.edu (Meor Yahaya)
Subject: Running other program ..
Message-Id: <5eivh9$3hd$1@cronkite.seas.gwu.edu>


I wrote the following script:
#!/usr/local/bin/perl

$m=2;
$y=1997;

@zzz = `/some/c/program `, $m, $y;

The problem is it does not pass the correct argument to the program. The
following line works, but I read somewhere that it is not secure
especially running as suid script. Any solution?

@zzz = `/usr/orson/2/www/student/meory/pray $m $y`;

Please include your reply to my e-mail. Thanks..

--
Meor Ridzuan Meor Yahaya
George Washington University
email:		meory@seas.gwu.edu
		mry@gwis2.circ.gwu.edu
http://iam.working.on.it		


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

Date: Thu, 20 Feb 1997 21:18:02 -0800
From: "J. Badger" <jbadger@hooked.net>
Subject: Savvy Newsgroup Monitors - Please Help :-)
Message-Id: <330D300A.730B@hooked.net>

I just got the Llama book and am trying to learn PERL but my ISP won't
allow scripts of any kind on their server so........

Anyone know whether or not I can download PERL to run on my C drive? If
so, where?


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

Date: 20 Feb 1997 22:10:46 GMT
From: fxrsg@camelot (Richard S. Guse)
Subject: status print not printing until output
Message-Id: <5eii56$vma@news.alaska.edu>
Keywords: status printing

My program processes a file of usernames, doing checks on each one.  When it
gets to a username that its checks flag as bad, it prints the useful
information that I need to fix the problem.  I put a 'status' line in the
program 'print ".";' to let me know it's dutifully going through the users,
but it only prints the '.'s directly before it prints something somewhere
else.  ie: it seems to be compiling wrong.  However, when I add the
'use diagnostics;' flag, (I of course use -w always), it works like it
should.

This is perl, version 5.003 with EMBED
        built under next at Thu Jan 23 1997 00:05:05 GMT-0900

anybody have an idea why this may not be working properly?

I tried to explicitly state STDOUT with the print statment, but it had no
effect.  use diagnostics; is a bit slow for everyday use, but it is usable.
*smile*  thanks for your help!

--
Physicist by Choice,         #define SYSOP GOD       Power corrupts.  Absolute
Mathematician by Accident,   #define REALITY NULL       power is kind of neat.
CS student by Mistake,       #include "universe.h"
Brilliant by act of God,          e-mail:     fxrsg@Camelot.acf-lab.alaska.edu
Poor by act of Congress...                          or fxrsg@Aurora.alaska.edu


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

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

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 V7 Issue 985
*************************************

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