[11287] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4887 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Feb 13 11:07:18 1999

Date: Sat, 13 Feb 99 08:00:57 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 13 Feb 1999     Volume: 8 Number: 4887

Today's topics:
    Re: == and = , again <bill@fccj.org>
        [Query] Help with search and replace script. <apandey@u.washington.edu>
    Re: choosing start_element() vs. startElement() ran@netgate.net
    Re: choosing start_element() vs. startElement() <flavell@mail.cern.ch>
    Re: File Handle Elements as numeric values <bill@fccj.org>
        HELP stripping NEWLINE character <saij@tampabay.rr.com>
    Re: HELP stripping NEWLINE character <jeffp@crusoe.net>
    Re: How to dereference properly (Marc-A. Woog)
    Re: How to dereference properly (Marc-A. Woog)
    Re: How to dereference properly <jdf@pobox.com>
    Re: IP Address of Client Machine <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: LWP installation fail .. (Randy Kobes)
    Re: newbie Q: subrt in a here doc (M.J.T. Guy)
    Re: Perl 'zine <carvdawg@patriot.net>
    Re: PFR: mkpath (Was: Re: How to create a directory usi (Randal L. Schwartz)
    Re: PFR: mkpath (Was: Re: How to create a directory usi (Randal L. Schwartz)
    Re: PFR: mkpath (Was: Re: How to create a directory usi <rra@stanford.edu>
    Re: Python vs. Perl vs. tcl ? <jdf@pobox.com>
    Re: Q: ActiveState ppm install failure jjwilley@email.msn.com
    Re: Red Haven - Manchester United <gellyfish@btinternet.com>
    Re: Shell access? <jdf@pobox.com>
    Re: Speed of Python <dcvagic@arcus.tel.hr>
        use of quote's <jcorbin@apci.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 13 Feb 1999 13:31:48 GMT
From: "Bill Jones" <bill@fccj.org>
Subject: Re: == and = , again
Message-Id: <89fx2.488$5n6.2767292@news2.jacksonville.net>

In article <916802417.200959@thrush.omix.com>, Zenin <zenin@bawdycaste.org>
wrote:


> Bart Lateur <bart.lateur@skynet.be> wrote:
> : Jim and Paula wrote:
> : >I know they hate to expand reserved words, but it would be nice to
> : >have  "equals" for  = ,  and "becomes"  for  ==
> :
> : It would be nicer still, if those were reversed.
>
>  IYHO, but not likely many others.  This has been hashed out many,
>  many times.  Most typically by novice programmers (and math types
>  who likely shouldn't be coding anyway) wanting the meaning reversed
>  from the current usage, and experienced programmers understanding
>  (quite correctly) that assignment is oft used 10x more often then
>  comparison.
>

Hmmm, why don't we just call '=' BECOMES  and '==' IS ?

Is that in the 'use English' set ???

2 Cents,
-Sneex-  :]
______________________________________________________________________
Bill Jones  | FCCJ Webmaster |  http://www.fccj.org/cgi/mail?webmaster
 http://certserver.pgp.com:11371/pks/lookup?op=get&search=0x37EFC00F
 http://rs.internic.net/cgi-bin/whois?BJ1936

    "Be not the first by whom the new are tried,
     nor yet the last to lay the old aside..."


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

Date: Sat, 13 Feb 1999 03:29:30 -0800
From: Anshuman Pandey <apandey@u.washington.edu>
Subject: [Query] Help with search and replace script.
Message-Id: <Pine.OSF.4.05.9902130326330.13702-100000@saul7.u.washington.edu>


Hello,

I have a script which is meant to process a large text file and format it
in a specific manner. The script functions properly for the most part,
however, it fails to do so when faced with certain elements in the text
file. The script follows below (pound sign doubled on first line for
safety's sake). The problem is described further below.

My knowledge of Perl is scant at best, so please bear me out!

##!/usr/bin/perl

while (<>) {
   next if /^\s*$/;                     # Skip blank lines
   if (/^\|bn(.)$/) {                   # Pick up book number
      $book = $1;
      printf("% Book: %s\n", $book);
      next;
   }
   elsif (/^\|c(.)$/) {                 # Pick up chapter number
      $chapter = $1;
      printf("% Chapter: %s\n", $chapter);
      next;
   }
   elsif (s/^\|p(.)\s*//) {             # Pick up verse number
      $verse = $1;
      printf("%02d%02d%02d %s", $book, $chapter, $verse, $_);
   }
   else {
      s/^\s*//;
      printf("%02d%02d%02d %s", $book, $chapter, $verse, $_);
   }
}
#end of script

--> The above script is to be run on such text as is given below.

|bn1
|c1
|p1  the first line of chapter one, verse one;
     the second line of chapter one, verse two.
|p2  the first line of chapter one verse two;
     the second line of chapter one verse two.

|bn2
|c10
|p11 the first line of chapter ten, verse eleven;
     the second line of chapter ten, verse eleven.
|p12 the first line of chapter ten verse twelve;
     the second line of chapter ten verse twelve.

--> When the script is run on the above text, it produces the following
--> text. Note the line numbering: The first two digits represent the
--> book number, the second two the chapter number, and the third two the
--> verse number.

% Book: 1
% Chapter: 1
010101 the first line of chapter one, verse one;
010101 the second line of chapter one, verse two.
010102 the first line of chapter one verse two;
010102 the second line of chapter one verse two.
% Book: 2
020102 |c10
020101 1 the first line of chapter ten, verse eleven;
020101 the second line of chapter ten, verse eleven.
020101 2 the first line of chapter ten verse twelve;
020101 the second line of chapter ten verse twelve.

--> As you may have noticed. The script was able to correct process
--> occurances of '|cxx' {where xx is a number) as long as the number is
--> less than 10. It malfunctions on double digit figures (as indicated
--> by the line containing '|c10'). The script should produce the
--> following text:

% Book: 1
% Chapter: 1
010101 the first line of chapter one, verse one;
010101 the second line of chapter one, verse two.
010102 the first line of chapter one verse two;
010102 the second line of chapter one verse two.
% Book: 2
% Chapter
021011 the first line of chapter ten, verse eleven;
021011 the second line of chapter ten, verse eleven.
021012 the first line of chapter ten verse twelve;
021012 the second line of chapter ten verse twelve.

--> Could anyone please provide me with some pointers to get this program
--> to function properly?

Thank you!

Regards,
Anshuman Pandey





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

Date: 13 Feb 1999 10:00:18 GMT
From: ran@netgate.net
Subject: Re: choosing start_element() vs. startElement()
Message-Id: <7a3ifi$lco$1@remarQ.com>

In <m3pv7g46pz.fsf@biff.bitsko.slc.ut.us>, Ken MacLeod <ken@bitsko.slc.ut.us> writes:

>The background is that the majority of XML toolkit standards have
>started using Java as their reference language for creating APIs.
>Java's style for method names is mixed-case with initial lower case,
>like `startElement()'.

How sad to be Java.  But,  I guess they had to make concessions to keep 
it from looking too scary to all those VB weenies they're trying to 
convert...

>As we author Perl modules that implement these broader standards it
>becomes an issue of whether to use the style given in the reference
>implementation (Java usually) or localize it to Perl style.

While reasonable people can (and,  undoubtedly,  will  ;-) differ 
greatly about which style is "better",  I think years of history of 
mixed-language programming,  going all the way back to the days when our
remote ancestors first developed HLLs with namespaces bigger than the 
underlying OSes,  lead to the conclusion that:

  1. If it's a direct implementation of something in the standard,  it
     should have the same name as in the standard,  but
  2. If it's a "wrapper",  a "superset",  or an "enhancement" of some
     sort,  it should have a name that's clearly distinct from the ones
     used in the standard.

>From a human-factors point of view,  the use of something like 
"pushedButtonName",  instead of "pushed_button_name" makes it clearer 
that it refers to an entity that's described in the standard,  and that 
the reader should consult the standard for information about it.
Especially since the very style of the name is "foreign" to Perl.

I think we can also expect a growing trend to "really late binding"-type
interfaces as the "typical" system's CPU power goes up.  And some of 
those interfaces will be using the names specified in the standards as 
part of their calling sequences.  If the rest of the code is already 
using them,  there's less guessing about how to translate,  and less 
fiddling with the manuals to check.

So,  the perceived suckiness of those names notwithstanding,  I believe 
there's only a little room for reasonable people to differ about the 
wisdom of using them to implement the standards.

Ran




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

Date: Sat, 13 Feb 1999 14:06:36 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: choosing start_element() vs. startElement()
Message-Id: <Pine.HPP.3.95a.990213140225.8138A-100000@hpplus01.cern.ch>

On 12 Feb 1999, Jonathan Feinberg wrote:

> IFindItHardToBelieveThatTheSameIsTrueOfStudlyCaps.  LoseTheStudlyCaps.

 Jargon File 3.0.0 - studlycaps
       studlycaps. /stuhd'lee-kaps/ n. A hackish form of silliness similar to
       BiCapitalization for trademarks, but applied randomly and to arbitrary
       text

Excuse me, but your example doesn't quite seem to fit the description,
even if there seems nothing wrong with the conclusion.
fine.

;-}

ThE oRigiN and SigNificaNce of thIs pRacTicE iS oBscuRe. 



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

Date: Sat, 13 Feb 1999 13:23:32 GMT
From: "Bill Jones" <bill@fccj.org>
Subject: Re: File Handle Elements as numeric values
Message-Id: <o1fx2.487$5n6.2764389@news2.jacksonville.net>

> Artoo (r2-d2@REMOVEbigfoot.com) wrote on MCMLXVII September MCMXCIII in
> <URL:news:781oik$f93$1@plug.news.pipex.net>:

> // , rather than as
> // text values which can not be manipulated numerically.


Wow!  I didn't know you can't manipulate Text variables numerically!

Learnt sum'thin I shouldn't be doin' then, huh?

call me crazy!
-Sneex-  :]
______________________________________________________________________
Bill Jones  | FCCJ Webmaster |  http://www.fccj.org/cgi/mail?webmaster
 http://certserver.pgp.com:11371/pks/lookup?op=get&search=0x37EFC00F
 http://rs.internic.net/cgi-bin/whois?BJ1936

    "Be not the first by whom the new are tried,
     nor yet the last to lay the old aside..."


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

Date: Sat, 13 Feb 1999 13:59:29 GMT
From: saij <saij@tampabay.rr.com>
Subject: HELP stripping NEWLINE character
Message-Id: <36C5860A.54483F5@tampabay.rr.com>

I am using s/\n/<br>/sg;

Why does it leve the newline characters in there??

Saij

please e-mail asap



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

Date: Sat, 13 Feb 1999 09:37:00 -0500
From: evil Japh <jeffp@crusoe.net>
Subject: Re: HELP stripping NEWLINE character
Message-Id: <Pine.GSO.3.96.990213093433.19433H-100000@crusoe.crusoe.net>

> I am using s/\n/<br>/sg;
> 
> Why does it leve the newline characters in there??

Gaze upon this:

% perl -l
$words = "this\nhas\nnewlines\n";
print $words;
$words =~ s/\n/<br>/g;
print $words;

[output]
this
has
newlines

this<br>has<br>newlines


That worked for me, without the /s (because it's not needed).
What version of Perl have you got?  perl -v shall tell you.

-- 
Jeff Pinyan (jeffp@crusoe.net)
www.crusoe.net/~jeffp

Crusoe Communications, Inc.
973-882-1022
www.crusoe.net



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

Date: Sat, 13 Feb 1999 11:18:22 GMT
From: mwoog@pobox.ch (Marc-A. Woog)
Subject: Re: How to dereference properly
Message-Id: <36c55b56.3950306@news.datacomm.ch>

On 12 Feb 1999 23:10:36 -0500, Jonathan Feinberg <jdf@pobox.com> wrote
in <m3socbvt8j.fsf@joshua.panix.com>:

Hi Jonathan,

>mwoog@pobox.ch (Marc-A. Woog) writes:
>
>> I have stored references to hashes in the hash %levels.
>
>Okay, solid.
>
>> foreach $key (sort keys %levels) {
>>  print "$key\n";
>>  foreach $level (@{$levels{"$key"}}) {
>                   ^
>
>Whoah, you said that $level{$key} is a reference to a hash, but you're
>dereferencing it as if it were an array ref.
>
>Which is it?
>
>If it's indeed a hash ref, you can examine it like so
>
>  foreach my $bookmark (keys %{$levels{$key}}) {
>     # do something with $levels{$key}->{$bookmark}
>  }

Thanks for your answer! Thanks to your code I found the problem!

This is the code:

# What I am trying do to here is to store references to
# hashes{$bookmark}=$url in the hash $levels{$level_name} which
# belong to the same level_name.

foreach $file (@filelist) {
  $level_name = &get_level_name($file);
  $bookmark = &get_bookmark_title($file);
  $url = &extract_url($file);
  # I think I am already doing something wrong here
  push(@{$levels{"$level_name"}}, {$bookmark => $url});
}

# Then extracting them: first sorted by $level_name, then after
# $bookmark
# This one seems to work (not quite what I wanted)

my %newhash;
foreach $level_name (sort keys %levels) {
  print "$level_name\n";
  foreach $level (@{$levels{"$level_name"}}) {
    %hash = %$level;
    foreach $bookmark (keys %hash) {
      # Here comes the workaround
      $newhash{$bookmark} = $hash{$bookmark};
    }
  }
  foreach $bookmark (sort keys %newhash) {
    print "  $bookmark -> $newhash{$bookmark}\n";
  }
  undef %newhash;
}

Now the above code works but it isn't exactly what I wanted. I think
that %levels points to an array of references to an anonymous hash
with just one value rather than to a hash with all the bookmarks and
urls of one level name: this is because the sorting doesn't work
(sorting a hash with one value, well...) I hope you can understand
this (I already have troubles myself). So it seems that I am already
storing the stuff the wrong way!

Thanks for any answers!

Regards,

Marc


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

Date: Sat, 13 Feb 1999 12:02:14 GMT
From: mwoog@pobox.ch (Marc-A. Woog)
Subject: Re: How to dereference properly
Message-Id: <36c66929.7490028@news.datacomm.ch>

On Sat, 13 Feb 1999 11:18:22 GMT, mwoog@pobox.ch (Marc-A. Woog) wrote
in <36c55b56.3950306@news.datacomm.ch>:

Found the answer myself!

[snipped]
>  # I think I am already doing something wrong here
>  push(@{$levels{"$level_name"}}, {$bookmark => $url});
[snipped]

Must be replaced with:

   $levels{$level_name} -> {$bookmark} = "$url";

After reading perlref once more ;) Sorry for bothering!

Regards,

Marc


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

Date: 13 Feb 1999 08:57:52 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: mwoog@pobox.ch
Subject: Re: How to dereference properly
Message-Id: <m390e276e7.fsf@joshua.panix.com>

mwoog@pobox.ch (Marc-A. Woog) writes:

> >  # I think I am already doing something wrong here
> >  push(@{$levels{"$level_name"}}, {$bookmark => $url});
> 
> Must be replaced with:
> 
>    $levels{$level_name} -> {$bookmark} = "$url";

Your analysis of the problem and the solution are both "right on" as
we still sometimes say here in the states.  

Congratulations on making your way through perlref.  Have you seen
perllol and perldsc?

No need to quote $url in the line of code above.  You should get out
of the habit of quoting without cause.  It will bite you someday,
e.g., when you inadvertently turn a perfectly good reference into a
useless *description of* a reference.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 13 Feb 1999 12:33:41 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: IP Address of Client Machine
Message-Id: <83ww1mczca.fsf@vcpc.univie.ac.at>

Re: IP Address of Client Machine, yyy
<yyy@hotmail.com> said:

yyy> I am currently facing a problem in obtaining IP
yyy> address of a client machine that is sending a
yyy> request to my server. I am using
yyy> $ENV{REMOTE_ADDR} to obtain the IP address of
yyy> the client. But what I am getting is the IP
yyy> address of the proxy server to which the client
yyy> is connected.

yyy> Could anyone please suggest if there is a way
yyy> out to get the actual IP address of the client.

No, there isn't.  E.g. if the "real" machine is in a
private net behind a firewall, having its IP address
is going to be pointless anyway.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien.  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: 13 Feb 1999 14:57:18 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: LWP installation fail ..
Message-Id: <slrn7cb594.bu3.randy@theory.uwinnipeg.ca>

On Sat, 13 Feb 1999 08:41:35 GMT, 
	hup@my-dejanews.com <hup@my-dejanews.com> wrote:
>I get a "robot/ua............HTTP Server terminated" at make test when
>I try to install it in my RedHat 5.2 box.
[snip]

Hi,
   This occurs because the test tries to call your web server
by your hostname, which you may not have bothered to set to
a valid name if you're not running various internet services
full time. Try setting your hostname to 'localhost' via the
hostname command, restart your web server, and try again.

		Best regards,
		Randy Kobes

-- 

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: 13 Feb 1999 15:21:55 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: newbie Q: subrt in a here doc
Message-Id: <7a45aj$5ph$1@pegasus.csx.cam.ac.uk>

Tad McClellan <tadmc@metronet.com> wrote:
>M. Morgan (mmorgan@gladstone.uoregon.edu) wrote:
>: I need to have a subroutine or array in a here document.  How is this done?
>: I can't find it in the Perl manual.
>
>   For subs, you can either put the return value into a scalar
>   variable before the here doc, and then interpolate the scalar:
>
>
>$show_msg = &show_msg;
>print <<HERE;
>some text...
>$show_msg
>more text...
>HERE

Or alternatively, you can use printf() to interpolate arbitrary
expressions.

printf <<HERE, &show_msg;
some text...
%s
more text...
HERE


Mike Guy


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

Date: Sat, 13 Feb 1999 06:18:01 +0000
From: Marquis de Carvdawg <carvdawg@patriot.net>
Subject: Re: Perl 'zine
Message-Id: <36C51919.89E6F9EE@patriot.net>

To everyone involved in this thread....

First, let me say that I never intended to publish a magazine in hard
copy that would compete with TPJ.  Somewhere along the line in the
thread, that managed to sneak itself in...but it's not the case.

My goal was to get some of that same excellent technical content on a
monthly basis.  If that means helping out the author of TPJ, then so be
it.

Second, as it turns out, someone is already working on a web-based
Perl monthly, and from what I was told, it will be available in April or May
at perlmonth.com.  I'm looking forward to it...almost as much as I'm
looking forward to the next edition of TPJ!!

Carv



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

Date: 13 Feb 1999 05:22:54 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: PFR: mkpath (Was: Re: How to create a directory using perl on linux?)
Message-Id: <m1pv7ecua9.fsf@halfdome.holdit.com>

>>>>> "Daniel" == Daniel Grisinger <dgris@moiraine.dimensional.com> writes:

Daniel> 	m%(.*)/[^/]*$% and mkpath $1 or next until -d || mkdir $_, 0755;

You forgot the s modifier (m//s) on that one to let "." match newline.
Your code will blow up on dirs with newlines in the names.  Very
important to remember that newline is a valid character in a name if
you're gonna write really general routines.

print "Just another Perl hacker," =~ /(.*)/s

-- 
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@teleport.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


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

Date: 13 Feb 1999 05:24:47 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: PFR: mkpath (Was: Re: How to create a directory using perl on linux?)
Message-Id: <m1lni2cu74.fsf@halfdome.holdit.com>

>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:

Larry> OK, so here once again (it is already in DejaNews, of course) is my 
Larry> function mkpath, this *last* time for the Perl Function Repository.

But but but why not just use the one that comes with Perl!

    use File::Path;
    mkpath ("/some/place/I/want/to/have");

No need to put anything in the repository... and this one's already
extremely portable!

print "Just another Perl hacker,"

-- 
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@teleport.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


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

Date: 13 Feb 1999 06:45:37 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: PFR: mkpath (Was: Re: How to create a directory using perl on linux?)
Message-Id: <yl90e2bbvy.fsf@windlord.stanford.edu>

Randal L Schwartz <merlyn@stonehenge.com> writes:
>>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:

> Larry> OK, so here once again (it is already in DejaNews, of course) is
> Larry> my function mkpath, this *last* time for the Perl Function
> Larry> Repository.

> But but but why not just use the one that comes with Perl!

>     use File::Path;
>     mkpath ("/some/place/I/want/to/have");

> No need to put anything in the repository... and this one's already
> extremely portable!

And unlike a lot of other modules, actually just does this and one closely
related thing (removing a path of directories).  Yeah, on this one, I'm
with Randal.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: 13 Feb 1999 09:16:23 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Python vs. Perl vs. tcl ?
Message-Id: <m33e4a75jc.fsf@joshua.panix.com>

There must be something wrong with my version of gnus.  I seem to have
this bug wherein a discussion of the relative merits of various
programming languages results in thoughtful and rational commentary by
informed people.  Has this been addressed in 5.6?
-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf
personally, I dig scheme


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

Date: Sat, 13 Feb 1999 13:46:41 GMT
From: jjwilley@email.msn.com
Subject: Re: Q: ActiveState ppm install failure
Message-Id: <7a3vo0$afq$1@nnrp1.dejanews.com>

In article <7a33s8$l49$1@nnrp1.dejanews.com>,
  john_j_willey@my-dejanews.com wrote:
> Several attempts to employ ActivePerl Build 509 ppm 'install' elicit a "Could
> not locate a PPD file for ..." failure message.  Since it seems unlikely that
> a printer definition file would appear in this context, can someone tell me
> what a PPD file denotes?
>
Whoops -- didn't do my homework.  ppm.pl, itself, defines PPD files as:

"ppm uses files containing an extended form of the Open Software
Description (OSD) specification for information about software packages.
These description files, which are written in Extensible Markup
Language (XML) code, are referred to as 'PPD' files.  Information about
OSD can be found at the W3C web site (at the time of this writing,
http://www.w3.org/TR/NOTE-OSD.html).  The extensions to OSD used by ppm
are documented in PPM.ppd."

Sorry I posted the question, forgive me.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 11 Feb 1999 21:23:58 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Red Haven - Manchester United
Message-Id: <79vhpe$2gk$1@gellyfish.btinternet.com>

On Thu, 11 Feb 1999 18:17:46 +0800 Linus Koh wrote:
> Do visit my new Manchester United site
> http://web.singnet.com.sg/~jopaloli/mufc.htm
> 

I dont think so - if you'd done some research you'd have discovered
that we're all 'Palace supporters ...

/J\
-- 
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 13 Feb 1999 09:07:31 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: Bill Garrett <bgarrett@hamilton.net>
Subject: Re: Shell access?
Message-Id: <m3679675y4.fsf@joshua.panix.com>

Bill Garrett <bgarrett@hamilton.net> writes:

> I have just started to learn perl programming and didn't have access
> to a unix shell.  I was wondering if anyone knew where to get a unix
> shell account for free.

Sure!  Install a free unix-like operating system on your own computer.
I use Linux, others go for FreeBSD, NetBSD, what have you.  You might
want to find a local user group for your system of choice, and offer
beer to them to help you install and configure whatever you choose.

I looked at your headers, and it *seems* you're running Windows 3.1,
so you're out of luck as far as running running Perl under your
current OS goes.  But if you're in fact using Windows 95/98/NT then
you can run Perl without a "unix shell".

   http://www.activestate.com/

> Would anyone consider letting me have access to there unix shell
> account?

If so, would you give me their phone numbers?  I've got a bridge to
sell.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf
need i say which bridge?


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

Date: Sat, 13 Feb 1999 10:36:14 +0100
From: Darko Cvagic <dcvagic@arcus.tel.hr>
Subject: Re: Speed of Python
Message-Id: <36C5478E.22129AE3@arcus.tel.hr>

Thomas Ackermann wrote:

> Perl is over 2 times faster than Python while reading stdin line for line,

 ..........

>

> ****************************************************************************
> Perl                                            Python
> ----------------------------------------------------------------------------
>
> while(<>)                                       from sys import stdin
> {                                               while stdin.readline():
> ;                                                     pass
> }
>
> time perl lines.pl \                           time python lines.py \
>   < /usr/dict/words                               < /usr/dict /words
>
> real    0m0.212s ***       < 2.231              real    0m0.473s
> user    0m0.210s                                user    0m0.450s
> sys     0m0.000s                                sys     0m0.020s
>
> ****************************************************************************
>
> Man, what are we doing here?!   ;-)
>
>         Byebye,
> --
>   Thomas Ackermann | Tel. +49-(0)228/631369|73-7773 | <tgm@math.uni-bonn.de>
>              finger tgm@rhein.math.uni-bonn.de for public key
>                GNU LINUX Python gtk pygtk MySQL FUDGE GURPS

Yes, but if you change a python peace of code

from sys import stdin                            user time is 0.61
while stdin.readline():
    pass

to this
from sys import stdin                            user time is 0.54
line=stdin.readline
while line():
    pass

you will get better results in about 10%.
This is because in first example python generate instance of class stdin in
every loop.

But generaly, you can't mesure clean function call vs.  call with object
creation.




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

Date: Sat, 13 Feb 1999 09:18:58 -0000
From: "John Corbin" <jcorbin@apci.net>
Subject: use of quote's
Message-Id: <36c59743.0@queeg.apci.net>

I am using a MySql database and would like to pass in values to my Select
statements. How do I get the single quotes around the values?? '$myvar'



--
John
jcorbin@apci.net







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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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