[9971] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3564 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 27 15:02:52 1998

Date: Thu, 27 Aug 98 12:01:31 -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, 27 Aug 1998     Volume: 8 Number: 3564

Today's topics:
    Re: Perl Docs.. forget the original post (Author) (Larry Rosler)
    Re: Perl Docs.. forget the original post (Author) <murrayb@vansel.alcatel.com>
    Re: Perl Docs.. forget the original post <simon@new-mediacom.com>
    Re: Perl Docs.. forget the original post <nonspammers.start.after.this.period.hot_redox@hotmail.com>
    Re: Perl version <jev@newton.pconline.com>
    Re: Perl version (Craig Berry)
        Please help - perl Hovercraft@altavista.net
    Re: Please help me convert MIME-characters - regex ques (Andre L.)
        Please Help Me With A RegX. chad@gurucom.net
    Re: Please Help Me With A RegX. (Matt Knecht)
        Q: getting core dump from perl, maby problem with fork( dow.jones@home.se
    Re: REQ Help. What lang do I need to use? <nonspammers.start.after.this.period.hot_redox@hotmail.com>
    Re: Unix grep from perl <rootbeer@teleport.com>
    Re: Unreadable Scripts? <ceci@bway.net>
    Re: Unreadable Scripts? (Michael J Gebis)
    Re: Unreadable Scripts? <murrayb@vansel.alcatel.com>
    Re: Unreadable Scripts? (Nathan V. Patwardhan)
        When using CGI.pm to upload file I get extraneous data (Robert Watkins)
    Re: Which perl for win32 (Windows NT)? (Louie)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 27 Aug 1998 10:32:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl Docs.. forget the original post (Author)
Message-Id: <MPG.104f3819a4ba96de9897f9@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <35E638D8.92F48F09@chesco.com> on Fri, 28 Aug 1998 00:58:00 -
0400, Charles Maier <maierc@chesco.com> says...
> John Porter wrote:
> > 
> > Simon Wistow wrote:
> > >
> > > > Simon Wistow wrote:
> > > > >
> > > > > Some of us with window boxes don't have grep either (now there's an
> > > > > idea, hmmmm);
> > > >
> > > > So what. Don't you have "Find: Files or Folders..." ???
> > >
> > > Yeah, but that doesn't work exactly like grep does, does it?
> > 
> > No, but does it need to?  You can still search for specific text,
> > which is sufficient 93% of the time.
> > 
> > --
> > John Porter
> 
> This just is not true. FIND: Files or Folders..." will find FILENAMES
> that match the argument. However.. There are utillities that run from
> DOS and windows that are available to search a series of files for
> 'hits' on "content".

"This just is not true."  Is the 'Advanced' tab under 'Find: File or 
Folders...' too advanced for you?  Under it, I find a box 'Of type:' with 
a long list of types to select from (sounds like 'grep *.foo', doesn't 
it?); a box 'Containing text:' (sounds like 'grep -F', doesn't it?); and 
an option 'Case Sensitive' (sounds like 'grep -i', doesn't it?).  So 
other utilities are *not* needed.

As for the rest of this thread:  The question people have been exploring 
is, "Should Perl document further the Unix/POSIX 'system calls' to which 
many of its functions interface?"  The nuances of the question have been 
illuminating, and I (for one) am satisfied with the consensus:  They are 
readily available via the Web, so use them that way.

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


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

Date: 27 Aug 1998 10:35:03 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Perl Docs.. forget the original post (Author)
Message-Id: <u4suycoqg.fsf@vansel.alcatel.com>

Charles Maier <maierc@chesco.com> writes:

> !. Do <"WE"> want better docs?

Better docs are always nice, although I find those that come with the
standard distribution of Perl to be sufficient.  Where I want more, I
pay for it.

> 2. Can someone knowledgable... explain how to accomplish it in a way
> that any changes through perl evolution willl allow these changes to
> follow along?

Submit your patches to the folks that build the docs.  If they are
incorporated, they will follow standard distributions.  No one can
control non-standard distributions, so don't encourage those by
using them.

> Enough yada - yaya...What is wrong with this picture?

You want more than you get for free.  To get more you will have to put
something in or pay.  What's the trouble?

-- 
Brad Murray      "This is one of the reasons you're such big hits at
Software Analyst  your parents' parties: being a good conversationalist
Alcatel Canada    is really what a liberal arts education is all about."


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

Date: Thu, 27 Aug 1998 18:36:20 +0100
From: Simon Wistow <simon@new-mediacom.com>
Subject: Re: Perl Docs.. forget the original post
Message-Id: <645CAC0140CED111AF1500805FEDDB8AB0D9@ns.new-mediacom.co.uk>

I was talking more about writing something that woudl exactly like grep,
so you could run it in a directory and just get the the relevant lines
in any files that contain the search string.

> -----Original Message-----
> From:	John Porter [SMTP:jdporter@min.net]
> Posted At:	Thursday, August 27, 1998 2:30 PM
> Posted To:	misc
> Conversation:	Perl Docs.. forget the original post
> Subject:	Re: Perl Docs.. forget the original post
> 
> Simon Wistow wrote:
> > 
> > > Simon Wistow wrote:
> > > >
> > > > Some of us with window boxes don't have grep either (now there's
> an
> > > > idea, hmmmm);
> > >
> > > So what. Don't you have "Find: Files or Folders..." ???
> > 
> > Yeah, but that doesn't work exactly like grep does, does it?
> 
> No, but does it need to?  You can still search for specific text,
> which is sufficient 93% of the time.
> 
> -- 
> John Porter



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

Date: 27 Aug 1998 18:37:32 GMT
From: "Saurus" <nonspammers.start.after.this.period.hot_redox@hotmail.com>
Subject: Re: Perl Docs.. forget the original post
Message-Id: <01bdd1e9$b03217e0$c1620c8a@lnxcompaq.lexis-nexis.com>

Simon Wistow <simon@new-mediacom.com> wrote in article
<645CAC0140CED111AF1500805FEDDB8AB06C@ns.new-mediacom.co.uk>...
> Yeah, but that doesn'twork exactly like grep does, does it?
> 
> > > Some of us with window boxes don't have grep either (now there's an
> > > idea, hmmmm);

Not confident I know what this thread is about, but thought
I'd spout this URL:

	http://www.itribe.net/virtunix/gnugrep.zip

Contains windoze executable and source.


Saurus



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

Date: 27 Aug 1998 17:15:38 GMT
From: John Erjavec V <jev@newton.pconline.com>
Subject: Re: Perl version
Message-Id: <6s447q$af1$2@bell.pconline.com>

David W. Crawford <dc@panix.com> wrote:
: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
: 
: dc:panix:~/>perl -e 'print "$]\n" '
: $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
: Patch level: 36
: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Please tell me that this is a joke.  Please tell me that they aren't using
Perl 4 (and from /usr/local/bin/perl5 ).  I don't think my poor heart
could take it.

-JEV
-- 
perl -le '$_="2756b636168402c62756050227568647f6e61402473757a4";
print reverse map chr hex reverse, /../g'


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

Date: 27 Aug 1998 17:41:07 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl version
Message-Id: <6s45nj$dnh$1@marina.cinenet.net>

David W. Crawford (dc@panix.com) wrote:
: cberry@cinenet.net (Craig Berry) writes:
: > Ferdi (cogelog@wanadoo.fr) wrote:
: > : I don't know exactly my Perl version. Where can I find it?
: > 
: > From the shell:  perl -v   (see perlrun)
: > From a script:   $]        (see perlvar)
: 
: and vice versa
[snip]

TMTOWTDI, BSOTAS. :)

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "Ripple in still water, when there is no pebble tossed,
       nor wind to blow..."


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

Date: Thu, 27 Aug 1998 17:59:09 GMT
From: Hovercraft@altavista.net
Subject: Please help - perl
Message-Id: <6s46pc$r55$1@nnrp1.dejanews.com>

Hi,
   Recently I setup a web site as a school project. It ended up becoming
abit more than just a school project. Last night I purchased a domain name and
virtual server from money I borrowed from my parents.

Since I started I have learned a lot of HTML but this is where my problems
lies.  I am looking for somebody to help me configure perl scripts. I really
need  somebody help and would appreciate if somebody can help me.

Thank your for reading.
David
E-mail: flightlines@altavista.net

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 27 Aug 1998 12:42:46 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: Please help me convert MIME-characters - regex question in fact
Message-Id: <alecler-2708981242460001@dialup-550.hip.cam.org>

In article <6s32q5$ul0$1@news.net.uni-c.dk>, Jan.Ferre@uni-c.dk (Jan
Ferri) wrote:

> I try to convert some MIME-characters to something reasonably decent, but 
> utterly fails.
> 
>    given a line like:
>       $line="Ple=61se=20H=65lp=20=4De";   # well constructed example
>    I try to
>       $line=~s/=([\da-fA-F]{2})/chr("\\x$1")/ge;
>    in order to get
>       $line eq "Please Help Me"
> 
> instead it gives me (\000 written as _):
>       $line eq "Ple_se_H_lp__e"
> 
> Has anyone got a good idea?


  $line =~ s/=([0-9A-Fa-f]{2})/pack "C", hex($1)/ge;

But you should really be using MIME::QuotedPrint, available thru CPAN.

HTH,
Andre


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

Date: Thu, 27 Aug 1998 17:27:56 GMT
From: chad@gurucom.net
Subject: Please Help Me With A RegX.
Message-Id: <6s44us$oh6$1@nnrp1.dejanews.com>



Hi,

Ok, I have 1 big long line and in that line there are many occuances of this

<li><a href="Employment/"><b>Employment</b></a><em>

I want to get everything from the <li> to the <em>, how might I go about this?

Thanks,

-chad

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 27 Aug 1998 17:52:22 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Please Help Me With A RegX.
Message-Id: <q1hF1.5$nb7.44971@news3.voicenet.com>

chad@gurucom.net <chad@gurucom.net> wrote:
>Ok, I have 1 big long line and in that line there are many occuances of this
>
><li><a href="Employment/"><b>Employment</b></a><em>
>
>I want to get everything from the <li> to the <em>, how might I go about this?

Assuming what you say is true (That all lines fit that format):

$line  = '<li><a href="Employment/"><b>Employment</b></a><em>';
$stuff = substr $line, 4, length($line) - 8;

$stuff contains everything except the first 4 characters "<li>" and the
last 4 characters "<em>".

If the tags you are looking for change in your data, you'll need to
modify this, or perhaps use a regex.

-- 
Matt Knecht - <hex@voicenet.com>


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

Date: Thu, 27 Aug 1998 17:14:54 GMT
From: dow.jones@home.se
Subject: Q: getting core dump from perl, maby problem with fork() ?
Message-Id: <6s446e$n6e$1@nnrp1.dejanews.com>

Hi,

I'm getting a core dump from my perl program when I'm running it frow a
browser (I can't run it from the command line by the way).

Is there anyway to find out why I get the core dump? It's very strange...
most of the time I don't get the core running exactly the same program but
sometimes the file is there. I can't see anything wrong from the browsers
point of view.

How can I analyze the core file?

I have several forks.. maby I have done something wrong there? Well.. here is
my fork() code:

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

use strict;
use Carp;

my $number_of_forks = 2;
my $started_forks   = 0;

my $waitedpid = 0;
sub REAPER
{
	$waitedpid = wait;
	$SIG{CHLD} = \&REAPER;
}
$SIG{CHLD} = \&REAPER;

while ($started_forks <  $number_of_forks) {
	my $pid = fork;

	# Parent
	if ($pid) {
		warn "$$ forked process $pid (started: $started_forks)\n";
		$started_forks ++;
	}
	else {

		# Child
		if (defined $pid) {
			warn "Child stuff by $$\n";
		}

		# Failure
		else {
			warn "Fork by $$ failed\n";
		}
		exit;
	}
}

wait;

warn "$$: Terminating\n";

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 27 Aug 1998 18:50:23 GMT
From: "Saurus" <nonspammers.start.after.this.period.hot_redox@hotmail.com>
Subject: Re: REQ Help. What lang do I need to use?
Message-Id: <01bdd1eb$7b931b40$c1620c8a@lnxcompaq.lexis-nexis.com>

[ some snippage ]
letmepost8053@my-dejanews.com wrote in article
<6s35ig$lgp$1@nnrp1.dejanews.com>...
> Hello,
>
> A web surfer comes to my site with either a pc (win 95/98) or mac. Surfer
> wants to add a .jpg/.png/.gif to our site that encourges people to share
> their vaction photos.
>
> What lang, programs, and/or set of commands should I look to for study to
get
> this to work?
>
> Eric
> acernote at earthlink dot net

Try http://www.terminalp.com/scripts/. Also, "HTML Forms tutorial"
came in handy for me:
http://www.webcom.com/~webcom/html/tutor/forms/example_list.shtml


Saurus



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

Date: Thu, 27 Aug 1998 16:55:05 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Unix grep from perl
Message-Id: <Pine.GSO.4.02A.9808270951270.4382-100000@user2.teleport.com>

On Thu, 27 Aug 1998, John McNerney wrote:

>   $tmp = `grep bob file.txt`;

> used to work fine, but for some reason the $tmp line is now only
> seeing one line of the multiple lines returned from the grep command.

Odd; can you make a small example program which demonstrates this bug?
(How can you be sure that grep is returning multiple lines?)

> I would do this grep function in perl, but file.txt is about
> 3M and the perl routine seems to be much slower.

Then you're not doing it right. :-)  Well, to be sure, Perl will probably
be somewhat slower than a good grep, but it's easy to write a bad routine
that's slower than it should be. For example, if you try to read the whole
3MB at once, that would be bad. 

Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 27 Aug 1998 13:16:12 -0400
From: "David" <ceci@bway.net>
Subject: Re: Unreadable Scripts?
Message-Id: <6s44a1$qae$1@camel0.mindspring.com>

>chmod 711 script.pl

>Last time I tried doing that the script failed to run for anyone but
>myself since perl needs to read the file in order to compile and
>execute it.
we have lost in information? -- T. S. Eliot.

CHMOD 115 seems to work...




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

Date: 27 Aug 1998 17:36:39 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Unreadable Scripts?
Message-Id: <6s45f7$7ka@mozo.cc.purdue.edu>

mjd@op.net (Mark-Jason Dominus) writes:
}In article <6s2ro7$r0s@mozo.cc.purdue.edu>,
}Michael J Gebis <gebis@fee.ecn.purdue.edu> wrote:
}>Different logins but the same directory?  That's so dumb it hurts. 

}What's dumb about that?  If they have the same uid, Unix doesn't care
}what the usernames are.  Then you can give one username and one
}password to one person, another username and password to another
}person, but they can still share the same resources.  

So remind me again how this thread got started?

-- 
Mike Gebis  gebis@ecn.purdue.edu  mgebis@eternal.net


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

Date: 27 Aug 1998 08:49:17 -0700
From: Brad Murray <murrayb@vansel.alcatel.com>
Subject: Re: Unreadable Scripts?
Message-Id: <uiujeo26a.fsf@vansel.alcatel.com>

mjd@op.net (Mark-Jason Dominus) writes:

> What's dumb about that?  If they have the same uid, Unix doesn't care
> what the usernames are.  Then you can give one username and one
> password to one person, another username and password to another
> person, but they can still share the same resources.  

Sounds like a case for group permissions, not user.


-- 
Brad Murray          "Be very, very careful what you put into that
Alcatel Canada        head, because you will never, ever get it out."
Software Analyst                        (Cardinal Wolsey)


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

Date: Thu, 27 Aug 1998 18:19:05 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Unreadable Scripts?
Message-Id: <tqhF1.40$V5.321212@shore>

Scratchie (upsetter@ziplink.net) wrote:

: Um... because the people who post FAQs aren't, by and large, reading the
: newsgroup beforehand?

Hmm.  Is it the case that people now subscribe, read and post to a
newsgroup without reading its FAQ beforehand?  Something has changed!
:-)

Feeling Rip Van Winkle,

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


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

Date: 27 Aug 1998 18:01:09 GMT
From: r-watkinsNOSPAM@worldnet.att.net (Robert Watkins)
Subject: When using CGI.pm to upload file I get extraneous data
Message-Id: <6s46t5$bnh@bgtnsc02.worldnet.att.net>

I have written a script, the intent of which is to allow one of our 
departments to upload a PDF file to a specific directory.

(NT4 running IIS 4, uploading from IE4 and Netscape4)

The temp file is written successfully, and if I change the extension to ".pdf" 
the file opens perfectly with Acrobat.

However, when I use:

$uploadedfile = $query->param(upload_field_name);
$filename = $uploadedfile;
$filename = s/.*\\//;
open (NEWPDF, "$specific_path$filename") or die ...etc.;
while (<$uploadedfile>) {
        print NEWPDF;
}
close($uploadedfile);
close(NEWPDF);

the newly created file is a few bytes larger than the original and temp files 
and Acrobat complains when I try to open it.

My guess is that it has to do with \r's and \n's and writing the file under an 
NT filesystem, but I don't know what the solution is.

Any assistance would be greatly appreciated.

Robert Watkins
Supervising Web Developer
Springer-Verlag New York, Inc.
r-watkins@NOSPAMworldnet.att.net
rwatkins@NOSPAMspringer-ny.com
http://www.springer-ny.com


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

Date: Thu, 27 Aug 1998 17:18:55 GMT
From: louie@visca.com (Louie)
Subject: Re: Which perl for win32 (Windows NT)?
Message-Id: <35e594c2.6627224@news.jet.es>

mepstein@staff.uiuc.edu (Milt Epstein) wrote:

>
>OK, I've read what FAQs I could find, and I've checked out a bunch of
>previous threads at dejanews, but I'm still confused.
>
>I'm trying to determine which version of perl to install on my Windows
>NT machine. 

My recommendation, for what it's worth (newbie-intermediate), is the
GS Perl. ActivePerl is not in compliance with the standard Perl. The
directory tree is a mess. Modules are very difficult to install.

The GS Perl is completely compliant and has nearly 400 modules already
installed. However, it doesn't have the "crypt" function, though there
is a workaround.

See http://www.visca.com/clueless/gs_or_as.html for more details.

All the best,
Lou Hevly
Clueless Lou's Cgi Help: Aid for the Clue-Challenged
http://www.visca.com/clueless/


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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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