[12861] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 271 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 27 13:07:17 1999

Date: Tue, 27 Jul 1999 10:05:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 27 Jul 1999     Volume: 9 Number: 271

Today's topics:
        ANNOUNCE: XML::RSS 0.2 <eisen@pobox.com>
    Re: Beginner-friendly group as cultural adaptation? (Larry Rosler)
    Re: Beginner-friendly group as cultural adaptation? (Tad McClellan)
    Re: beginner-redirect and download <james.williamson@bbc.co.uk>
        cgi HTTP header information <richard.garside@zen.co.uk>
        cgi HTTP header information <richard.garside@zen.co.uk>
        cgi HTTP header information <richard.garside@zen.co.uk>
    Re: cgi HTTP header information (I R A Darth Aggie)
    Re: cgi HTTP header information (Randal L. Schwartz)
    Re: converting net address... <garethr@cre.canon.co.uk>
    Re: converting net address... <gemal@dk.net>
    Re: Description of code../ (Anno Siegel)
        Disabling NT User Account <paulnap@umich.edu>
        following symbolic links in perl <eedjoes@eed.ericsson.se>
    Re: following symbolic links in perl <emschwar@rmi.net>
    Re: Geekspeak Programming Contest <cmcurtin@interhack.net>
    Re: Geekspeak Programming Contest <kejoki@netdoor.com>
    Re: Geekspeak Programming Contest sjs_mrs@my-deja.com
    Re: Getting Height and Width of GIF/JPEG in PERL? <nospam.newton@gmx.net>
    Re: Getting Height and Width of GIF/JPEG in PERL? <tchrist@mox.perl.com>
    Re: Getting Height and Width of GIF/JPEG in PERL? (Larry Rosler)
    Re: I need fast help (Tad McClellan)
    Re: Korn Shell or Perl? <cmcurtin@interhack.net>
    Re: Orwant book status? (was Re: stopping email) (I R A Darth Aggie)
    Re: Pass by value or pass by reference? <keithmur@mindspring.com>
    Re: POSIX module <trcull@my-deja.com>
    Re: Pretty prompt creation from info in a file... (Michel Dalle)
    Re: reg expression <llornkcor@llornkcor.com>
    Re: reg expression (Anno Siegel)
    Re: Removing characters (Tad McClellan)
    Re: stopping email overflow on failure <jcreed@cyclone.jprc.com>
    Re: the number of fields in a form <aqumsieh@matrox.com>
        This is just a test. Sorry. Don't reply. (LMC)
    Re: Which group is appropriate? (Larry Rosler)
    Re: Which group is appropriate? (I R A Darth Aggie)
    Re: Which group is appropriate? (I R A Darth Aggie)
    Re: Which group is appropriate? (Tad McClellan)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: 27 Jul 1999 15:56:12 GMT
From: Jonathan Eisenzopf <eisen@pobox.com>
Subject: ANNOUNCE: XML::RSS 0.2
Message-Id: <7nkkqs$vap$1@play.inetarena.com>

DLSI=adpO

This is the second alpha release because the API has not
been finalized. The module will be available at your local
CPAN archive. Alternatively, try one of the 2 URLs:
http://www.perl.com/CPAN/authors/id/E/EI/EISEN/XML-RSS-0.2.tar.gz
http://www.perlxml.com/modules/XML-RSS-0.2.tar.gz

This Perl module provides a basic framework for creating and maintaining

RDF Site Summary (RSS) files. This distribution also contains several
examples that allow you to generate HTML from an RSS file.
This might be helpful if you want to include news feeds on your Web
site from sources like Slashot and Freshmeat.

RSS is primarily used by content authors who want to create a
Netscape Netcenter channel, however, that doesn't exclude us from using
it
in other applications.
For example, you may want to distribute daily news headlines to partners
and
customers who convert it to some other format, like HTML.

For the most part the module adheres to the RSS spec as it exists at
http://my.netscape.com/publish/help/quickstart.html.
Unfortunately, the RSS spec also allows one to use any HTML entity
without
first declaring them. Since XML::RSS is based on XML::Parser, you
can only use the default XML entities.

Please send comments, problems, etc. to eisen@pobox.com. I am especially
looking for suggestion for  additional functionality.

Jonathan.




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

Date: Tue, 27 Jul 1999 08:58:07 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <MPG.120776e0e4bb0dac989d50@nntp.hpl.hp.com>

In article <slrn7pramr.3hn.M.Ray@carlova.ulcc.ac.uk> on 27 Jul 1999 
12:49:31 GMT, Malcolm Ray <M.Ray@ulcc.ac.uk> says...
 ...
> I think it would be better for those who believe that clpmisc isn't
> working to improve the *existing* group, rather than fragmenting
> the Perl community further.  The culture of a group *does* change
> over time, and the best way to effect change is to lead by example.
> If you recruit enough useful contributors to your kinder, gentler
> viewpoint, then eventually the curmudgeons will be seen as irrelevant
> and will either leave, change their ways, or could be safely killfiled.

c.l.p.moderated was formed to provide a high signal-to-noise ratio for 
those who were unhappy with c.l.p.misc.  The ratio is indeed high, but 
the signal is very small, because those 'curmudgeons' are still here, 
where the traffic is.

> Your mission, should you choose to accept it, is to find a way to
> motivate your friendly troops while preventing burn-out.

I would characterize c.l.p.moderated as a failure, as its goal relative 
to c.l.p.misc hasn't been met.  I think c.l.p.newbies or whatever would 
be the same.  The 'friendly troops' want to be where the action is -- 
and where the other 'friendly troops' are.

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


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

Date: Tue, 27 Jul 1999 07:49:48 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <sc6kn7.edl.ln@magna.metronet.com>

John Callender (jbc@shell2.la.best.com) wrote:

: I realize that newbies are still going to stumble in here, and get
: their hair parted. I don't expect that to change. I find myself
: increasingly depressed by it, though, which is actually kind of odd,
: considering how I used to find it so entertaining. I suppose that must
: be related to the aging process somehow.


   Most of the other "curmudgeonly" posters have been here for *years*.

   Multiply your experience by the factor necesary for you to get
   to that length of participation. Then consider how folks in the
   bottom 90 percentile of "tolerant and nice" might migrate to
   a different demographic group  :-)


   It doesn't take a Rocket Scientist to see where the "rudeness
   response to rudeness' comes from.   :-(


   If we could reduce the initial rudeness (posting without checking
   the Standard Docs), this recurring theme would stop occuring.

   But we can't.

   So it won't.

   :-(


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 27 Jul 1999 16:31:50 +0100
From: "James Williamson" <james.williamson@bbc.co.uk>
Subject: Re: beginner-redirect and download
Message-Id: <7nkjfn$so8$1@nntp0.reith.bbc.co.uk>



>##
>## Is it possible to tell a browser to download a file and redirect the
browser
>## to another URL, or in failing that, open a new window that prompts the
>## download and send the original window to a new URL?
>
>Hi,
>
>is it possible to tell a penguin to catch a fish and redirect the penguin
>to another iceberg, or in failing that, man a new ship that starts the
>fishing and send the original ship to a new iceberg?
>
>Your question isn't only poorly phrased, it shows a lack of knowledge
>on how the web works. But most of all, it's completely off topic here.
>
>Go away.
>
>
>Abigail
>--

A Virtual Bully of the lowest form. I bet you don't treat people like this
when you aren't masquerading as some form of Usenet schoolmistress. Grow up
and learn some humility.

James Williamson





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

Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <hckn3.3$0z4.47@newreader.ukcore.bt.net>

Hi,

I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.

I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.

Thanks,
Richard.




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

Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <Fxkn3.1247$0z4.203@newreader.ukcore.bt.net>

Hi,

I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.

I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.

Thanks,
Richard.




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

Date: Tue, 27 Jul 1999 16:02:06 +0100
From: "Richard Garside" <richard.garside@zen.co.uk>
Subject: cgi HTTP header information
Message-Id: <9Hkn3.1817$0z4.273@newreader.ukcore.bt.net>

Hi,

I have a cgi script that will be used by several users. It is a
sitesearching tool. It works fine but the problem is that at present anyone
using it can search through the directories of other people hosted on our
server. I want to find the path location of the pge that calls my script so
I can check they aren't trying to access other users sites.

I tried using HTTP_REFERER which did work but some of our users have domains
which are on virtual servers. Is there any header I can use to find the
physical location on the server of the page calling the script.

Thanks,
Richard.




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

Date: 27 Jul 1999 15:51:42 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: cgi HTTP header information
Message-Id: <slrn7prlgj.bjb.fl_aggie@thepentagon.com>

On Tue, 27 Jul 1999 16:02:06 +0100, Richard Garside
<richard.garside@zen.co.uk>, in
<_Pjn3.19476$nW3.1796@newreader.ukcore.bt.net> wrote:

[posted 5 times]

Please stop bouncing on the <post> button.

+ I tried using HTTP_REFERER which did work but some of our users have domains
+ which are on virtual servers. Is there any header I can use to find the
+ physical location on the server of the page calling the script.

Use a hidden tag, or call the script thusly:

<url:http://www.coaps.fsu.edu/cgi-bin/environ.pl/some/path/to/the/page/>

PATH_INFO: /some/path/to/the/page/

Somewhat kludgey, there may be another solution that's better, and
where's the perl question? you should try comp.infosystems.www.authoring.cgi
or .misc.

James


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

Date: 27 Jul 1999 09:46:06 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: cgi HTTP header information
Message-Id: <m1n1wi9h2p.fsf@halfdome.holdit.com>

>>>>> "Richard" == Richard Garside <richard.garside@zen.co.uk> writes:
[at least five times]

Richard> I have a cgi script that will be used by several users.

I suppose you'll be posting once for each user? :)

Richard>  It is a sitesearching tool. It works fine but the problem is
Richard> that at present anyone using it can search through the
Richard> directories of other people hosted on our server. I want to
Richard> find the path location of the pge that calls my script so I
Richard> can check they aren't trying to access other users sites.

Richard> I tried using HTTP_REFERER which did work but some of our
Richard> users have domains which are on virtual servers. Is there any
Richard> header I can use to find the physical location on the server
Richard> of the page calling the script.

No.  You'll have to work out a different strategy.  Each trip to the
web server is a different transaction.  Nothing necessarily relates
them.  If you rely on the browser to send down something reliable, you
*will* be burned later. :)

And this question has NOTHING to do with Perl, and would have been
best asked and answered in comp.infosystems.www.authoring.cgi, not
here.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 27 Jul 1999 15:31:52 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
To: Henrik Gemal <gemal@dk.net>
Subject: Re: converting net address...
Message-Id: <siaesinm6v.fsf@cre.canon.co.uk>

Henrik Gemal <gemal@dk.net> wrote:
> Could anybody give me a line (or two) that can convert text links into
> html links.

Try HTML::FromText, downloadable from CPAN:
http://www.cpan.org/authors/id/G/GD/GDR/HTML-FromText-1.004.tar.gz

-- 
Gareth Rees


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

Date: Tue, 27 Jul 1999 18:35:35 +0200
From: Henrik Gemal <gemal@dk.net>
Subject: Re: converting net address...
Message-Id: <379DDFD6.5E0F8CA6@dk.net>

"Randal L. Schwartz" wrote:

> >>>>> "Henrik" == Henrik Gemal <gemal@dk.net> writes:
>
> Henrik> The text is:
> Henrik> "this is text www.gemal.dk with links
> Henrik> more text www.gemal.dk/test more links
> Henrik> bla bla http://www.gemal.dk blabla
> Henrik> bla bla http://www.gemal.dk/test blabla
> Henrik> bla bla http://test.gemal.dk blabla
> Henrik> bla bla http://test.gemal.dk/test blabla
> Henrik> "
>
> Henrik> I would like to convert all the possible links in the text into valid
> Henrik> HTML links, that's <A HREF= bla bla bla...
>
> You really don't want all *possible* links... you'll end up with:
>
>         <a href="b">b</a><a href="l">l</a><a href="a">a</a> ...
>
> since "b" and "l" and "a" are possible links.  Heck, even the null
> string is a possible link.
>
> I don't say this to be stupid.  Half the problem in writing a program
> is getting the specfication proper enough.  The other half is fighting
> bugs in the language, although for Perl, that's thankfully avoided.
> (That's why we Perl hackers gets things done twice as fast.)
>
> As soon as you can accurately state what a "possible link" is in,
> preferably, a regular expression (hint hint), your job will be mostly
> done.
>
> Also note that you are reinventing various wheels.  There are txt2html
> translators out there.  In particular, I'm a heavy user of MHonArc,
> which takes a mail message and makes a nice web page from it,
> extracting interesting links.  I believe MHonArc is in the CPAN.
>
> print "Just another Perl hacker,"
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Possible links in the text above would be:
www.gemal.dk
www.gemal.dk/test
http://www.gemal.dk
http://www.gemal.dk/test
http://test.gemal.dk
http://test.gemal.dk/test

--
Henrik Gemal, gemal@dk.net
Network Innovator
Tele Danmark Internet




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

Date: 27 Jul 1999 16:42:33 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Description of code../
Message-Id: <7nknhp$9gt$1@lublin.zrz.tu-berlin.de>

scmpoper  <scmpoper@scmp.com> wrote in comp.lang.perl.misc:
>Hello all:
>  I am learning perl myself, and i found some difficulty on
>  command "study".there are example code below which from
>  "Programming Perl" page 226, but i don't understand what
>  it does from line 3 to line 10. description line by line
>  is appreciate and many thank...
>
>1      $seach= 'while (< >) {study;';
>2      foreach $word (@words) {
>3           $search .= "++\$seen{\$ARGV} if /\\b$word\\b/;\n";
>4                             }
>5      $search .="}";
>6      @ARGV = @files;
>7      undef $/;              # slurp aech antire file
>8      eval $search;          # this screams
>9      die $@ id $@;          # in case eval failed
>10     $/ = "\n";             # put back to normal input delim
>11     foreach $file (sort keys(%seen)) {
>12             print $file,"\n";
>                                        }

Well... this is fairly advanced stuff.  Forget about "study" for
the moment, the program does the exact same thing without it, only
slower.

Line 1 - 5 build up the string $search, which becomes a little perl
program.  Or not so little, depending on @words.  You may want to
set @words = qw( Fresh roast penguin), then run the code up to line 5
and print $search to see the perl code it contains.

After some preparation in lines 6 and 7, eval in line 8 executes
the perl code in $search.  This will put a filename from @files
as a key into the hash %seen if the file contains any of the words
in @words.  Lines 11 - 12 print them.

Now for the "study"... well, since you have the Camel open on page
226 anyway, you can read that up on page 225.

Anno



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

Date: Tue, 27 Jul 1999 11:24:20 -0400
From: "Paul Napolitano" <paulnap@umich.edu>
Subject: Disabling NT User Account
Message-Id: <bakn3.2653$nB.386382@news.itd.umich.edu>

Does anybody know the correct syntax to make this work? This is what I have
so far. I can't seem to get this to work.

use Win32::AdminMisc;

$domain = "LSA"

sub DisableAccount() {
$flags = $attribs{USER_FLAGS} | UF_ACCOUNTDISABLE;
print "Enter User Account to Disable: ";
chomp ($username = <STDIN>);
Win32::AdminMisc::UserSetMiscAttributes($domain,$username,
 USER_FLAGS=>$flags );
}




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

Date: Tue, 27 Jul 1999 13:24:54 +0200
From: Joern Stein <eedjoes@eed.ericsson.se>
Subject: following symbolic links in perl
Message-Id: <379D9706.E55DB5DF@eed.ericsson.se>

Hi there,

I need to get the filename a symbolic link points to into a variable.
The problem looks like this:


I have one variable that looks like:
$file = "/home/user/perl/tmp/test.html"

The file in question looks like this:
lrwxrwxrwx   1 user        19 Jul 27 13:17 test.html ->
 ../finder/test.html

What I need is output like
$newfile = "/home/user/perl/finder/test.html"

I have written a rather ugly script to do this by doing a lot of string
and list work and splitting and joining, but that does not really
satisfy me :( It looks like:

glue((split(" ", `ls -l $file`))[8], (split(" ", `ls -l $file`))[10])
 ...
sub glue {
    my ($d, $f) = @_;
    $d = dirname $d;
    if (index($f, "/") == 0) {
	$d = $f
    } else {
	$d .= "/".$f
    }
    my @d = split("/", $d);
    my @new = ();
    while (@d) {
	my $t = shift @d;
	if ($t eq "..") {
	    pop @new;
	} else {
	    push @new, $t;
	}
    }
    join("/", @new);
}


This returns the looked for value, but isn't there a better way of doing
this? Maybe even a simpler one?
-- 
Cheers
Joern Stein
-----------------------------t--h--e--r--e--i--s--n--o--s--p--o--o--n-
Ericsson Eurolab Deutschland GmbH	X/SGM GPRS PLM and Support


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

Date: 27 Jul 1999 10:56:46 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: following symbolic links in perl
Message-Id: <xkf4siqm3ox.fsf@valdemar.col.hp.com>

Joern Stein <eedjoes@eed.ericsson.se> writes:
> I need to get the filename a symbolic link points to into a variable.

perldoc -f readlink

-=Eric


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

Date: 27 Jul 1999 11:46:31 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: Geekspeak Programming Contest
Message-Id: <xlxso6axfhk.fsf@gold.cis.ohio-state.edu>

>>>>> On Mon, 26 Jul 1999 21:12:22 -0500,
    Kevin Kinnell <kejoki@netdoor.com> said:

Kevin> I tend to agree, but just watch someone's face while they're
Kevin> parsing "noon-thirty" for the first time.

I say "noon-thirty" (or "midnight-thirty") instead of 12:30
consistently.  It has gotten a few chuckles, but I have yet to see
someone fail to grok it.

-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: Tue, 27 Jul 1999 11:40:05 -0500
From: Kevin Kinnell <kejoki@netdoor.com>
Subject: Re: Geekspeak Programming Contest
Message-Id: <379DE0E5.B39EF21F@netdoor.com>

Tom Christiansen wrote:
>> ..."noon-thirty" ...
> 
> Really?  My friends and I say it all the time.  I'm not
> kidding at all.

Yeah, me too.  And people get it almost immediately when they hear
it for the first time, but frequently that split second of facial
expression *while* they're getting it is priceless.

--
Kevin Kinnell <kejoki@netdoor.com>


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

Date: Tue, 27 Jul 1999 16:45:46 GMT
From: sjs_mrs@my-deja.com
Subject: Re: Geekspeak Programming Contest
Message-Id: <7nknno$d22$1@nnrp1.deja.com>

In article <gleeson-ya02408000R2507991421560001@news.unimelb.edu.au>,
  gleeson@unimelb.edu.au (Martin Gleeson) wrote:

> But don't forget:
>      separated = seperated

In what language?  What sort of thing is "seperated"?

Is this really a spelling flame where the flamer incorrectly spells a
word the original poster got right?

Steve


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 27 Jul 1999 17:15:51 +0200
From: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <379DCD27.253B63C1@gmx.net>

Wayne Venables wrote:
> 
>     Does anyone have any code to retrieve the height and width of GIF
> and JPEG files?

I'd say this is a FAQ. Doesn't that mean this should find its way into
the regular Perl documentation? It's not in mine (5.005_51); at least,
perldoc -q image retrieves nothing, and perldoc -q size only gives me
"How do I get the screen size?" from perlfaq8. Tom? Gnat?

Cheers,
Philip


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

Date: 27 Jul 1999 09:26:56 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <379dcfc0@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net> writes:
:Wayne Venables wrote:
:> 
:>     Does anyone have any code to retrieve the height and width of GIF
:> and JPEG files?
:
:I'd say this is a FAQ. 

Can you imagine it going into the comp.lang.c FAQ?

And don't get me started on the abomination known as perldoc.  Just don't.

--tom
-- 
I know I'm a pig-ignorant slut.  --Andrew Hume


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

Date: Tue, 27 Jul 1999 09:37:43 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <MPG.12078032774fcec9989d51@nntp.hpl.hp.com>

In article <379dcfc0@cs.colorado.edu> on 27 Jul 1999 09:26:56 -0700, Tom 
Christiansen <tchrist@mox.perl.com> says...
> In comp.lang.perl.misc, 
>     "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net> writes:
> :Wayne Venables wrote:
> :> 
> :>     Does anyone have any code to retrieve the height and width of GIF
> :> and JPEG files?
> :
> :I'd say this is a FAQ. 
> 
> Can you imagine it going into the comp.lang.c FAQ?

Does C have an Image::Size module?

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


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

Date: Tue, 27 Jul 1999 07:26:32 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: I need fast help
Message-Id: <815kn7.lbl.ln@magna.metronet.com>

Marko Cehaja (thetaworld@magikomik.de) wrote:

: Subject: I need fast help


   You have come to the wrong place.

   So you must *want* fast help, not *need* fast help.

   Hire a contractor when you *need* "fast help".

   Post to Usenet when you can live with getting the answer in
   hours, days, or never.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 27 Jul 1999 11:44:10 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: Korn Shell or Perl?
Message-Id: <xlxvhb6xflh.fsf@gold.cis.ohio-state.edu>

>>>>> On 26 Jul 1999 22:39:49 -0700,
    Tom Christiansen <tchrist@mox.perl.com> said:

Tom> Because the cretin was defecating where he thought we weren't
Tom> looking.

Surely he must know that Perl programs scour every news spool for
infidels.  (...said the man posting with a Lisp newsreader.)

(But it is cool that ksh can do sockets now.)

-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: 27 Jul 1999 16:02:30 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Orwant book status? (was Re: stopping email)
Message-Id: <slrn7prm4r.bjb.fl_aggie@thepentagon.com>

On 27 Jul 1999 08:55:48 -0500, Abigail <abigail@delanet.com>, in
<slrn7prei8.1mc.abigail@alexandra.delanet.com> wrote:
+ John Callender (jbc@shell2.la.best.com) wrote on MMCLVI September
+ MCMXCIII in <URL:news:379d5af2$0$202@nntp1.ba.best.com>:
+ || 
+ || Speaking of algorithm books, does anyone know the status of Jon
+ || Orwant's new O'Reilly book? It was supposed to be coming out some time
+ || ago, and I've really been pining for it.

+ It's supposed to be ready before the conference.

Which means the first printing will be sold out at the conference.

James


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

Date: Tue, 27 Jul 1999 11:27:03 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Pass by value or pass by reference?
Message-Id: <379DDDD7.93C2D3C6@mindspring.com>

Carfield Yim wrote:
> 
> I am new to perl, if you find this is a easy question, please tell me
> where can I find solution.
> 
> When I pass an object as parameter to a function, or return an object
> from a function,
> i.e.: return ($rv);
>       db_write ($dbh);
> 
> is these operation pass the value (copy) or pass the reference (link)?
> 
perldoc perlsub:

"Any arguments passed to the routine come in as the array @_. Thus if
you called a function with two arguments,
those would be stored in $_[0] and $_[1]. The array @_ is a local array,
but its elements are aliases for the
actual scalar parameters. In particular, if an element $_[0] is updated,
the corresponding argument is updated (or
an error occurs if it is not updatable). "

Sounds more like reference than value to me...

As for return, it pretty much *has* to return a value, if you think
about it.  Or even just do:

perldoc perlfunc

and look for 'return'.

Perldoc is your friend.


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

Date: Tue, 27 Jul 1999 16:31:47 GMT
From: Tim Cull <trcull@my-deja.com>
Subject: Re: POSIX module
Message-Id: <7nkmtj$cbs$1@nnrp1.deja.com>



> For a module called 'Module::Foo', all you need to do is:
>
>         man Module::Foo
>
> Amazing, isn't?
>

Yes, thank you for stating the obvious.  The problem with that approach
is that I first need to download the module, get my IT department to
install it on our development machine, which for date-related modules
requires going through Y2K testing and other such hullabo, and then
type the obvious 'man Module::Foo' only to discover that the module
doesn't have the function I'm looking for.  I also need to know what
module to do the man on, for example I needed a floor() function and I
didn't have the foggiest idea that I should be looking in the POSIX
module for it except that I accidentally happened on a 2-sentence
example in a book that used it.  I can't very well go installing every
module on CPAN, manning all of them and then uninstalling the ones I
didn't need every time I want to find a particular functionality.

Does anyone have any more constructive advice, like a URL for a web site
that lists the contents of modules, ideally in a searchable format?

--Tim Cull
>




Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Tue, 27 Jul 1999 16:17:36 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Pretty prompt creation from info in a file...
Message-Id: <7nkm78$b7m$1@news.mch.sbs.de>

In article <379DAB83.FF98FE72@home.com>, Joan Richards <richj@home.com> wrote:
>Hello,
>
>I've got a question that I'm not exactly sure how it can be solved.
>Here's the problem...let's say that I have a file filled with data that
>might look like this:
>
>property 222 76 89
>shoes stink
>birkenstocks rule
>property 333 23 11
>rest soon
[snip]
>(1) property 222 76 89
>(2) property 333 23 11
>
>and then just hvae the user enter "1" or "2", and then have my routine
>that will appropriate remove this line called and do it's necessary
>work.  Now, understand that hte # of "property" entries will grow and
>shrink, so I need something that is dynamic in figuring out this
>information.

Here are some random thoughts :

1) if you are 100% sure that only one user can add or delete entries
at a time (e.g. by locking the file and working with a single routine
in command line mode), you may simply use the 1, 2, etc. to identify
which entry to delete. But this is unlikely to be valid.

2) if you are 100% sure that each entry is unique (depends on the
meaning of your 'property') and you work with separate routines
like in a CGI environment, you could include the full entry as parameter
for the 'deleting' routine. The 'deleting' routine should then look up the
matching line and delete it (after locking the file, obviously).

3) if you are not 100% sure that each entry will be unique, there will
always be cases where you can get into trouble, so you'd better rethink
your strategy.

Have a look at the Perl FAQ 5 for some hints about files, locking, 
deleting lines in a file or renaming files...

Good luck,

Michel.

--
aWebVisit - extracts visitor information from WWW logfiles and shows
the top entry, transit, exit and 'hit&run' pages, the links followed
inside your website, the time spent per page, the visit duration etc.
For more details, see http://gallery.uunet.be/Michel.Dalle/awv.html


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

Date: Tue, 27 Jul 1999 08:58:40 -0600
From: "llornkcor" <llornkcor@llornkcor.com>
Subject: Re: reg expression
Message-Id: <7nkhbt$iv1$1@holly.prod.itd.earthlink.net>


No need too... I was just making a point, that if these people making
condescending comments about that they were tired of seeing these stupid
questions, and that I should read the FAQ, post my stupid questions
elsewhere, and making me feel bad about asking, what I thought, was a
legitimate question, that they can choose to NOT post a reply. What's so
hard about that?
No need to answer THAT question, either.

>
> I don't suppose there's any point in trying to explain it to you.
>





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

Date: 27 Jul 1999 15:14:27 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: reg expression
Message-Id: <7nkicj$9d8$1@lublin.zrz.tu-berlin.de>

llornkcor <llornkcor@llornkcor.com> wrote in comp.lang.perl.misc:
>
>No need too... I was just making a point, that if these people making
>condescending comments about that they were tired of seeing these stupid
>questions, and that I should read the FAQ, post my stupid questions
>elsewhere, and making me feel bad about asking, what I thought, was a
>legitimate question, that they can choose to NOT post a reply. What's so
>hard about that?

I don't suppose there's any point in explaining it to you.

>No need to answer THAT question, either.

No.

Anno


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

Date: Tue, 27 Jul 1999 07:07:11 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Removing characters
Message-Id: <vs3kn7.lbl.ln@magna.metronet.com>

Jody Fedor (JFedor@datacom-css.com) wrote:

: Tad McClellan wrote in message <8d4hn7.ueh.ln@magna.metronet.com>...
: >Jody Fedor (JFedor@datacom-css.com) wrote:
: >
: >: Jimtaylor5 wrote in message
: >: <19990725161814.21146.00001525@ng-fx1.aol.com>...
: >: >I'm trying to remove every first character of my variables. If it was on
: >: the

: >: $var =~ s/.//;

: >   Try it with:
: >
: >      $var = "\n12345";


: The operative word here is remove every first character (not control
      ^^^^^^^^^^^^^^                            ^^^^^^^^^
: character).  


   Exactly!

   \n *is* a character (it is also a control character, but there was
                        no mention of any character subsets in the
                        original specification
                       )


: You have to make a few assumptions 


   You do not _have_ to (sometimes you do, but this isn't one 
   of those times).

   See my followup for an example that does not  :-)


: in these requests, such as
: they are probably reading in a file delimited or end of record by \n or \n
: \r.  (At least all my file EOF are \n but I made the file in the first
: place!)  I guess I shouldn't read so much into the questions.


   $/ can be set to any arbitrary string.

   Assuming "reading a line at a time" is not a very safe assumption.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 27 Jul 1999 11:39:46 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: stopping email overflow on failure
Message-Id: <a1pv1ep0e5.fsf@cyclone.jprc.com>

fl_aggie@thepentagon.com (I R A Darth Aggie) writes:

> + perhaps the Schrodinger::Fish module would be more 
> + instructive as it seems the original poster is intent
> + on not opening the box.
> 
> Good point, but wouldn't that conflict with the Schrodinger::Cat
> module?

Oh, is that project still being worked on? I thought it died.

(Then again, one can never be entirely certain about these
sorts of things)

---Jason


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

Date: Sun, 25 Jul 1999 19:02:23 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: the number of fields in a form
Message-Id: <x3yiu78jpts.fsf@tigre.matrox.com>


Kaimar <kaimar@ut.ee> writes:

> is the number of fields in the form limited?

What form? Perl has no forms.

> i encountered a situation, where the first 16 values are passed to the
> script, but all the others are ignored. what might be the reason for
> that?

If you are talking about CGI, then my best guess is that it has
something to do with the server you're running your scripts on. Check
the docs for your server.

HTH,
Ala



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

Date: Tue, 27 Jul 1999 11:53:48 -0400
From: "Michel Thibault (LMC)" <lmcmith@lmc.ericsson.se>
Subject: This is just a test. Sorry. Don't reply.
Message-Id: <379DD60C.AE3B2C@lmc.ericsson.se>

Hi,

This is just a test. Sorry. Don't reply.

M



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

Date: Tue, 27 Jul 1999 08:03:06 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Which group is appropriate?
Message-Id: <MPG.12076a08571463fa989d4f@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <379db1f2@cs.colorado.edu> on 27 Jul 1999 07:19:46 -0700, Tom 
Christiansen <tchrist@mox.perl.com> says...
> In comp.lang.perl.misc, 
>     bj <bradw@newbridge.com> writes:
> :Whom would babysit said group, answering the same FAQs over and over
>     ^
> :again, correcting all the wrong answers, gently redirecting all the
> :lost, confused and clueless back to the road towards better
> :understanding? 
> 
> While your point is well-taken, I'm afraid your accusatives are leaking
> through.  Here's a pop quiz:

Your Latin-based grammar is leaking through.

$English =~ s/accusative/objective/;

> 1   It's really a question of who/whom you're trying to make happy.
> 2   It's really a question of who/whom is happy.
> 3   It's really a question of who/whom you've seen.
> 4   It's really a question of who/whom wants to go.
> 5   It's really a question of who/whom is going.
> 6   It's really a question of who/whom you think is going.
> 7   It's really a question of who/whom you told to go.
> 
> When you've figured out the correct answers to those seven simple
> questions, the rest will be easy.

Here's a useful (heuristic|algorithm) [UNTESTED :-]:

(my $clause = $_) =~ s|.+who/whom(.+)|John$1|;

Permute the words in $clause until it makes sense to anyone but Yoda.

s|/whom|(index($clause, 'John') && 'm'|e;

The last statement somewhat less cryptically:

s|who/whom|index($clause, 'John') == 0 ? 'who' : 'whom'|e;

This approach also works using 'he/him' instead of 'John', and I find 
that to be more mnemonic.

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


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

Date: 27 Jul 1999 15:13:39 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Which group is appropriate?
Message-Id: <slrn7prj98.bjb.fl_aggie@thepentagon.com>

On 27 Jul 1999 07:19:46 -0700, Tom Christiansen <tchrist@mox.perl.com>, in
<379db1f2@cs.colorado.edu> wrote:

+ While your point is well-taken, I'm afraid your accusatives are leaking
+ through.  Here's a pop quiz:

AAAAAAAAAAAAAIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEE! It's too early in
the morning...

+ 1   It's really a question of who/whom you're trying to make happy.
+ 7   It's really a question of who/whom you told to go.

AAAAAAAAAAAAAIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEE! Now my head hertz,
and I don't know whom to blame.

James


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

Date: 27 Jul 1999 15:42:08 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Which group is appropriate?
Message-Id: <slrn7prkuk.bjb.fl_aggie@thepentagon.com>

On Tue, 27 Jul 1999 09:51:48 -0400, toby <toby@venice.cas.utk.edu>, in
<379DB974.A62D9798@venice.cas.utk.edu> wrote:

+ > [Fundamental ignorance of Socratic philosophy snipped]

Ok, Socrates never had to deal with AOL or the "if you can't explain it
in a 30 second sound bite, I won't understand it" crowd.

+ > + Please, how does ridicule help anyone?
+ >
+ > Most people have pride. When that pride is wounded, they're more likely
+ > to _not_ repeat their mistake(s).

+ This rules out masochism and other socio-psychological constructs that
+  one can see in the everyday co-worker, and sometimes oneself..

There are other newsgroups where one can satiate such urges infinitely
better.

+ > Because programming requires discipline?

+ To me, discipline requires a narrowing tack, rather than
+ openness. Is it not true that the concept of discipline is founded in
+ the notion that there is only one way to do things, a priori?

Why? discipline is an attention to detail, as you amply illustrate:

+ You could say that a rock climber is disciplined in that he/she
+ works out, concentrates on a goal, etc. But the rock climber never
+ goes up the rock the same way.

By being disciplined, by taking her time, by doing things the Right Way,
the rock climber in question reduces the chance of a painful fall. But
she may also attack the rock in any way she deems is likely to produce
the desired results.

The same can be said of the perl programmer who uses '-w', 'use
strict', syntax checks his code, and checks to make sure his open()
and system() succeed. These are all things that the "beginning perl
programmer" may see as unnecessary and actually a hinderance to their
coding.

It took several cases of open() jumping up and biting me on the butt
(by not opening) before I got the idea that maybe 'open() or die $!'
was a better way to do things. It is now habit.

+ It may be a case of lazynesss (following a well-established line),

Which is also a virtue.

+ artistry (a creative twist on the established line) or brilliance
+ (trail-blazing, eurekas-at-every-move on a new line). Certainly the
+ last instance would be preferable, but are we all capable of each?

A relative few are trail-blazers. Most of us follow an established
line (of which there may be several), with the occasional bit of
brilliance so we can say 'hehehehehe...that was pretty clever, if I
say so myself'.

But one can not achieve brilliance or even blaze trails when one is
tripping over an open() statement that doesn't open anything...

James


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

Date: Tue, 27 Jul 1999 07:00:16 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Which group is appropriate?
Message-Id: <0g3kn7.lbl.ln@magna.metronet.com>

Kevin Kinnell (kejoki@netdoor.com) wrote:
: Jonathan Stowe wrote:
: ....
: > Er, comp.lang.perl doesnt exist - hasnt done for a while ...

: That's what the faq says, but it exists on my ISP's news server,


   Your ISP is giving you a clue that the *don't maintain* their
   newserver when they include newsgroups that were removed
   *several years* ago.

   I would consider changing to a more clueful ISP.


: and on the local U's news server, 


   So there is a another misconfigured server.


: and it gets quite a few 
: posts from many other domains than those I just mentioned--probably
: from people who haven't read the faq and don't realize it's just
: a figment.  ;-)


   They post because their newservers have buggy configurations.

   Allowing posts to non-existent newsgroups is a *bug*,
   not a *feature*.

   There are lots of sysadmins that don't do their job right.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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 V9 Issue 271
*************************************


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