[12282] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5882 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 4 00:07:37 1999

Date: Thu, 3 Jun 99 21:00:18 -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, 3 Jun 1999     Volume: 8 Number: 5882

Today's topics:
    Re: \n doesn't work on NT4 SP4 <ppjohn@ncs.com.sg>
    Re: \n doesn't work on NT4 SP4 <fkamardean@email.msn.com>
    Re: Auto de/increments help (David Efflandt)
        capture the output from screen?? <ppjohn@ncs.com.sg>
    Re: capture the output from screen?? <fkamardean@email.msn.com>
    Re: CGI Newbie (David Efflandt)
    Re: Get WinNT login <fkamardean@email.msn.com>
    Re: Im not asking for much (Andrew M. Langmead)
    Re: miliseconds in a timestamp? (Abigail)
    Re: Password Generator <fkamardean@email.msn.com>
    Re: PERL FREELANCERS: WANT TO MAKE A QUICK $500? <webmaster@chatbase.com>
    Re: pipes?? (David Efflandt)
        Problem running '.exe' from 'CGI' <sjhoadle@inwave.com>
    Re: Problem with NULLs (Abigail)
    Re: simple newbie problem <uri@sysarch.com>
    Re: simple newbie problem (Larry Rosler)
    Re: Speed question... (Abigail)
    Re: stupid ISP? (Abigail)
    Re: The artistic license and perl: <rra@stanford.edu>
    Re: The artistic license and perl: <rra@stanford.edu>
    Re: The artistic license and perl: <rra@stanford.edu>
    Re: turn cache off in IE (Abigail)
    Re: while (@myarr) (Abigail)
    Re: You can earn $50,000 by learning programming skills <IMNOT@ZHOMEZ.COM>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 04 Jun 1999 10:59:06 +0800
From: John Paopeng <ppjohn@ncs.com.sg>
To: Amonotod <amonotod@netscape.net>
Subject: Re: \n doesn't work on NT4 SP4
Message-Id: <375740FA.D77C7911@ncs.com.sg>

Hi
I am running Perl that juse downloaded last week on
NT4 SP4 and my "\n" is working fine. I didn't see any
problem with that. Must be something wrong with your OS or
something else.

John

-- 
=========================================================================
mailto:ppjohn@ncs.com.sg
PGP key: http://www.nai.com/products/security/public_keys/lookup_key.asp
Home page: http://www.geocities.com/TheTropics/Island/5251/
==========================================================================


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

Date: Thu, 3 Jun 1999 23:27:18 -0400
From: "Fadel" <fkamardean@email.msn.com>
Subject: Re: \n doesn't work on NT4 SP4
Message-Id: <OYzj8ojr#GA.180@cpmsnbbsa03>

Just try print("bla bla\n");=20
 instead of print "bla bla\n";
    Amonotod wrote in message <7j6un4$rqq$1@nnrp1.deja.com>...
    Hello all, and thank you for your time.
   =20
    Running NT4 Sp4 Hotfixes and Y2K Update on a Micron PII-450 as a =
PDC.
    Have ActiveState Perl for Win32 installed (Downloaded about 3 weeks
    ago.).  Putting together a script for Profiles/User =
Directories/Exhange
    Accounts, and can't get the newline character "\n" to work.  Just =
for
    more info, I am not using any outside modules (Mostly because I am =
too
    simple at programming to use modules.), just running straight Perl.
    Never had a problem with this on Solaris, but can't seem to make it =
work
    on NT.  Here's an example:
   =20
    print "Please confirm the info you have entered. \n";
    print "Username is $username, first name is $first_name, \n";
    print "last name is $last_name, and title is $title. \n";
    print "Is this infomation correct?"
    $status =3D 0;
    while ($status < 1){
           $ansr =3D <stdin>;
           chop $ansr;
           lc $ansr;
           if ($ansr ne ( 'y' || "n'){
                 redo;
    ... and so on...
   =20
    Anyway, none of the newlines are shown.  Script just puts all text =
on
    one line, and wraps around the screen.  I even tried \r, \p and
    combinations of the three, all to no avail.  I have searched the
    newsgroups and all the Web FAQ's and cant find this one, so I am =
posting
    it now.  Any help is appreciated, feel free to reply to the =
newsgoups or
    my email, as listed below.
   =20
    Thank you all,
    William
   =20
   =20
   =20
    --
        `\|||/                     amonotod@
          (@@)                     netscape.net
      ooO_(_)_Ooo________________________________
      _____|_____|_____|_____|_____|_____|_____|_____|
   =20
   =20
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.



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

Date: 4 Jun 1999 02:09:25 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Auto de/increments help
Message-Id: <slrn7led71.ju.efflandt@efflandt.xnet.com>

On Tue, 01 Jun 1999 18:14:01 GMT, jknoll@my-deja.com <jknoll@my-deja.com> wrote:
>I am testing auto de-in crements and I keep getting hung up on this
>little script.
>
>Im trying to get this;
>Two $nums are 10 * 2 and adding one to $var makes Perl++
>Two $nums are 20 and adding to $var makes Perm
>
>and I get this:
>Two $nums are 10 * 2 and adding one to $var makes Perl++
>Two $nums are 20 and adding to $var makes Perl
>
>why doesn't the Perl change to Perm ??
>
>tia
>Jesse
>
>here's the code:
>
>$var="Perl";
>$num=10;
>print "Two \$nums are $num * 2 and adding one to \$var makes $var++\n";
>print "Two \$nums are ", $num * 2," and adding one to \$var makes ",
>$var++,"\n";

Simple, $var++ is not incremented until *after* the statement.  Try
++$var.

>--
>JESSE KNOLL
>--Senior - Ball State University - INDIANA --
>jrknoll@cwix.com
>
>Majors:				Minor:
>Sport Administration		Computer Science
>Business Finance
>
>...Either you have the force...or you don't.
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.


-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: Fri, 04 Jun 1999 11:27:26 +0800
From: John Paopeng <ppjohn@ncs.com.sg>
Subject: capture the output from screen??
Message-Id: <3757479E.F7B433FF@ncs.com.sg>

Hi
Let's say I write a perl script to "ping" some IP address.
So, that I will get the the output that will display on screen.
Do you know how can I capture that output and assign to $_ to do
string matching??? Any example will be nice.

Any help will be greatly appreciated.
John
-- 
=========================================================================
mailto:ppjohn@ncs.com.sg
PGP key: http://www.nai.com/products/security/public_keys/lookup_key.asp
Home page: http://www.geocities.com/TheTropics/Island/5251/
==========================================================================


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

Date: Thu, 3 Jun 1999 23:56:25 -0400
From: "Fadel" <fkamardean@email.msn.com>
Subject: Re: capture the output from screen??
Message-Id: <O7u8M5jr#GA.330@cpmsnbbsa03>

just use the normal redirection output ">" when you execute the ping =
command:
the code would look like :=20
system("ping my.server.com >c:\\ip.txt");

    John Paopeng wrote in message <3757479E.F7B433FF@ncs.com.sg>...
    Hi
    Let's say I write a perl script to "ping" some IP address.
    So, that I will get the the output that will display on screen.
    Do you know how can I capture that output and assign to $_ to do
    string matching??? Any example will be nice.
   =20
    Any help will be greatly appreciated.
    John
    --=20
    =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
    mailto:ppjohn@ncs.com.sg
    PGP key: =
http://www.nai.com/products/security/public_keys/lookup_key.asp
    Home page: http://www.geocities.com/TheTropics/Island/5251/
    =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



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

Date: 4 Jun 1999 02:20:32 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: CGI Newbie
Message-Id: <slrn7ledrs.ju.efflandt@efflandt.xnet.com>

On Tue, 01 Jun 1999 20:59:55 GMT, phil hoyt <philh@stalag13.com> wrote:
>I just want a simple droplet to decode info sent via email with the
>method "post". Information on tbis subject is hard to track down and
>most of it is for posting directly via http. 
>Any suggestions would be helpful including URLs to check out or
>alternate newsgroups I should be sending this to.

Since mailto: of form data is not documented in html standards and is
browser specific, it is not recommended.  However, the form data could 
easily be formatted however you want it using a perl CGI script with the
CGI.pm module.  Then the script could e-mail the formatted results.

-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: Thu, 3 Jun 1999 23:36:59 -0400
From: "Fadel" <fkamardean@email.msn.com>
Subject: Re: Get WinNT login
Message-Id: <eaICWujr#GA.372@cpmsnbbsa03>

try $ENV{USERNAME}
this function gets the value of the enviro. variable USERNAME.
Usualy this variable is defined to check it, go to the dos prompt and =
tape "set"
you should see all env. variables
    Reiner Fischer <110363.3163@compuserve.com> wrote in message =
<3756C092.6352D902@compuserve.com>...
    Hello,
   =20
    I would be very happy, if I would get some help from you.
    I use Perl on WindowsNT. Is it possible to get the Login
    from the User, who starts a Perl Script?
   =20
    Many thanks in advance!
   =20
    Best regards,
    Reiner Fischer
   =20




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

Date: Fri, 4 Jun 1999 03:38:23 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Im not asking for much
Message-Id: <FCsA42.HLG@world.std.com>

John Callender <jbc@shell2.la.best.com> writes:

>An analogy that stikes me is that of CPR training (which I did for a
>while for the Red Cross). When CPR instruction programs were first
>instituted, there was some resistance from the physician community:
>these people learning CPR were not doctors; what made them think they
>could provide care?

One obvious difference is that almost all of these CPR trained lay
people at least took a course and received certification before
attempting the procedure. Its not like they saw George Clooney do it
on ER and decide that it is worth giving it a go. (On the other hand,
my former boss was a very distractable type who never could sit still
long enough for a course. He was also very concerned about heart
attacks and so learned the important information for CPR. Earlier this
year when a neighbor's contractor had a heart attack, my former boss
and his doctor son-in-law performed it and saved the man.)

The people have taken CPR courses learn a severly limited routine and
perform them by rote. This isn't something that you can compare to the
the non-programmers who try to pick up perl without picking up any of
the important concepts of programming. There is nothing rote in
programming (instead the programmer makes decisions to design a device
that will.) 

I don't necessarily agree with the "perl is a poor 1st programming
language" line, but your "0th programming language" argument scares me
even more. Once these people pick up perl or any other computer
language, they *are* programmers. They can be amateur programmers,
they can be novice programmers, they can even be poor programmers; as
long as the admission is there.

[lots of stuff deleted]
>There are now, what, 10 kajillion pages of Official Perl Documentation?
>How much of it written specifically for this audience I'm talking
>about? Any of it? How often does an obvious newbie posting to this
>group get more polite, helpful followups (of the sort that Tom Phoenix
>used to provide so tirelessly) than snippy asides to other experts
>about the incidence of stupid comments from particular domains?

One often given answer is "patches welcome." I don't think the
documentation is intentionally written above the level of the
novice. Some, like perldsc, perllol, and perltoot, are were written as
easier to follow documents than their original drier reference
material. And I'm sorry, if someone sees the list of related perl
documents in the perl man page and doesn't read any of them because
the list contains such esoteric ones as "perlguts", or "perlapi" there
isn't much hope for them.

If someone makes the decision to become a programmer, (even an
amateur, novice, or poor one) they should learn that programming
involves research. Tell me what you don't undertant about an entry in
the perlfunc man page and I'll try to explain it to you, but don't ask
"how do I ... in perl" without expecting me to point out what word for
word passage in the documentation contains  the answer.


-- 
Andrew Langmead


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

Date: 3 Jun 1999 21:47:32 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: miliseconds in a timestamp?
Message-Id: <slrn7lefvb.im9.abigail@alexandra.delanet.com>

amidalla@my-deja.com (amidalla@my-deja.com) wrote on MMCII September
MCMXCIII in <URL:news:7j6600$hju$1@nnrp1.deja.com>:
<> I'm looking for a smaller unit than the second to write to a log file
<> when an action is encountered.  Currently I'm just using minutes and
<> seconds:  ($sec, $min) = localtime(time)           ..Thanx..


FAQ.


Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 3 Jun 1999 23:45:13 -0400
From: "Fadel" <fkamardean@email.msn.com>
Subject: Re: Password Generator
Message-Id: <#vDpG0jr#GA.335@cpmsnbbsa03>

try this function=20
##############################################
# Sub: Random Password
# This generates psudo-random 8-letter
# passwords

sub randompass {
 srand(time ^ $$);
 @passset =3D ('a'..'k', 'm'..'n', 'p'..'z', '2'..'9');
 $randpass =3D "";
 for ($i =3D 0; $i < 8; $i++) {
  $randum_num =3D int(rand($#passset + 1));
  $randpass .=3D $passset[$randum_num];
 }
 return $randpass;
}

    jatgal@my-deja.com wrote in message <7j695t$ivs$1@nnrp1.deja.com>...
    Does any one know, any good perl password generators, that will =
generate
    easy to remember but secure passwords. Please let me know if you =
know
    any scripts/modules/programs for it or the best way to do it.
   =20
   =20
    Thanks
    J
   =20
   =20
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.



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

Date: Thu, 03 Jun 1999 20:59:48 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: PERL FREELANCERS: WANT TO MAKE A QUICK $500?
Message-Id: <37574F34.32FAD829@chatbase.com>

salbarcar@my-deja.com wrote:
> 
> We have a calendar that we're trying to modify.

Ok.

> It utilizes an SQL
> database. All that we need it to do is search by a DATE RANGE and RETURN
> RESULTS IN BATCHES OF 25. Right now it only searches one month at
> a time.

And this you'll pay $500 for someone to do? I wouldn't feel comfortable
charging that much for such a thing! I'm not in the business of ripping
people off.

> My familiarity with Perl suggests that this is an easy job.

It is...

> Maybe 12?
> hours of work.

12 hours of work? You aren't very familiar with Perl after all.

> Our bid is $500.

That's too much. Besides, that's $41 per hour even if it was 12 hours,
and I'm afraid I charge $41.25 per hour.

> 
> Please e-mail me at speralta@awwa.org for further details. Only e-mail
> responses will be answered.

Then why'd you post here?

> In other words, I don't come to this group
> often so if you want to get a hold of me, E-MAIL ME.

Then why'd you post here? I'll have to take your post in two ways.
#1: SPAM-ish, as it looks like a head-hunter that doesn't know where to
post. #2: It looks like a joke post.

Why are you posting from dajanews? It seems you're someone that is
trying to get help on a problem and think saying you'll pay way too much
for the job will get you that help? maybe? It just seems that way to me,
no offense -- unless I'm right, in which case please do take offense.
-- 
Regards,
Tim Greer: chatmaster@chatbase.com / software@linkworm.com
Chat Base: http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software: http://www.linkworm.com | CGI scripting in Perl/C, & more.
Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
Freelance Programming & Consulting, Musician, Martial Arts, Sciences.


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

Date: 4 Jun 1999 02:45:53 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: pipes??
Message-Id: <slrn7lefbe.ju.efflandt@efflandt.xnet.com>

On Tue, 1 Jun 1999 21:25:51 +0100, James Stevenson <James@linux.home> wrote:
>
>i am trying to exec an external program
>am i need to read the data that it prints to the STDOUT
>how can i do this and is it down with pipes??

man perlipc

>thanks
>
>-- 
>---------------------------------------------
>Check Out: http://www.users.zetnet.co.uk/james/
>E-Mail: mistral@zetnet.co.uk


-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: Thu, 03 Jun 1999 21:22:59 -0500
From: Steve Hoadley <sjhoadle@inwave.com>
Subject: Problem running '.exe' from 'CGI'
Message-Id: <37573883.743D1330@inwave.com>

Alright, I beat my head against a wall all day and now I need YOUR help.

Heres the layout:
   windows NT
   microsoft Internet Information Server (IIS) 4.0
   Active state perl

I've written a 'cgi-bin' perl program and put it in the right place
(c:inetpub/wwwroot/cgi-bin), access it from a web page and it works!
EXCEPT. It skips over all of the 'system' calls that I use
(ie 'system "C:/winnt/.../notepad.exe";'). My question is "how do I run
an external application from the 'cgi-bin' area when it is accessed by a

web page". Oh yea. Just to really get me the program works fine if I
just run it in a command window.

I'm off to take some tylenol. I'll check back later.
In advance, THANKS. I owe ya.



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

Date: 3 Jun 1999 21:55:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Problem with NULLs
Message-Id: <slrn7lege8.im9.abigail@alexandra.delanet.com>

quanlay@my-deja.com (quanlay@my-deja.com) wrote on MMC September MCMXCIII
in <URL:news:7ivrul$ua1$1@nnrp1.deja.com>:
 .. I've run into a rode block.  Maybe someone can
 .. shed a little light on this for me.
 .. 
 .. I would like to use a standard routine to write
 .. to a database using a module but I can seem to
 .. write NULLs to a variable and write it to the
 .. database.
 .. 
 .. The database can accept nulls and in some
 .. instances, other programs accessing the database
 .. expect them.
 .. 
 .. Currently, an example of my code looks like this:
 .. 
 .. package testnull;
 .. 
 .. sub new {
 ..   my $test = shift;
 ..   my $class = ref($test) || $test;
 ..   my $self = {
 ..     String => '',
 ..     Integer => 0,
 ..     Nothing => null
 ..   };
 ..   bless($self, $class);
 ..   return $self;
 .. }
 .. 
 .. sub Write {
 ..   my $self = shift;
 ..   my $sql = "
 ..     INSERT INTO testtable (
 ..     String, Integer, Nothing
 ..     ) VALUE (
 ..     $self->{String},
 ..     $self->{Integer},
 ..     $self->{Nothing}
 ..     )
 ..   ";
 ..   return $sql;
 .. }
 .. 
 .. ...
 .. 
 .. Anyhow the return SQL statement is written to the
 .. database but the problem is that it chokes.
 .. Nothing could be an Integer or a Null.  I want to
 .. avoid if thening the $self->Nothing for an undef
 .. or null to build a sql statement of
 .. ... $self->(Integer), null) ...
 .. because I want the full sql in one statement
 .. quote if possible...
 .. 
 .. Any Suggestions?


If you would actually write out the SQL you generated, you would find
the SQL code is:

        INSERT INTO testtable (String, Integer, Nothing)
        VALUE (, 0, null)

You probably want:

        INSERT INTO testtable (String, Integer, Nothing)
        VALUE ("", 0, null)

(And are you sure 'VALUE' is ok, shouldn't it be VALUES?)


Furthermore, the
       Nothing => null
expression you have uses a bareword. You should be doing:
       Nothing => 'null'




Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 03 Jun 1999 22:52:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: simple newbie problem
Message-Id: <x7zp2gad9h.fsf@home.sysarch.com>

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

  LR> 21:04:13 -0700, Drifter <drifter888@hotmail.com> says...

  >> I've been looking at many tutorials on regular expressions and i
  >> can't seem to figure out how to change only the first letter of a
  >> variable from lowercase to uppercase.

  LR>     s/([a-z])/\u$1/;

if what he asks for is accurate, then you can just use ucfirst:

	$capped = ucfirst $lower ;

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Thu, 3 Jun 1999 20:12:31 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: simple newbie problem
Message-Id: <MPG.11c0e3e64e13a1fc989b68@nntp.hpl.hp.com>

In article <x7zp2gad9h.fsf@home.sysarch.com> on 03 Jun 1999 22:52:10 -
0400, Uri Guttman <uri@sysarch.com> says...
> >>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
> 
>   LR> 21:04:13 -0700, Drifter <drifter888@hotmail.com> says...
> 
>   >> I've been looking at many tutorials on regular expressions and i
>   >> can't seem to figure out how to change only the first letter of a
>   >> variable from lowercase to uppercase.
> 
>   LR>     s/([a-z])/\u$1/;
> 
> if what he asks for is accurate, then you can just use ucfirst:
> 
> 	$capped = ucfirst $lower ;

    $lower = '123xyzdef';

'... how to change only the first letter of a variable from lowercase to 
uppercase.'

'letter' ne 'character' if what he asks for is accurate.  :-)

Here is the rest of my comment, which you snipped:

This converts the first lower-case ASCII letter in the string to upper-
case.  As shown, it doesn't have to be the first character in the 
string.  You should be able to make suitable modifications for your 
needs.
 

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


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

Date: 3 Jun 1999 21:57:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Speed question...
Message-Id: <slrn7leghf.im9.abigail@alexandra.delanet.com>

nick (nick@auger.net) wrote on MMCI September MCMXCIII in
<URL:news:3755B1A9.B320357@auger.net>:
// Ok, my perl script goes into a directory of (could be 100,000,000+
// files), and opens eace file and takes the first line of it.  How fast
// will it work, if it is dealing with what could be a million files?


How fast are your disks?



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 3 Jun 1999 21:59:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: stupid ISP?
Message-Id: <slrn7legmj.im9.abigail@alexandra.delanet.com>

Bastiaan S van den Berg (office@asc.nl) wrote on MMCII September MCMXCIII
in <URL:news:7j5vt2$n5v$1@zonnetje.NL.net>:
,, hiya
,, 
,,  i just mailed my isp for the 2853-th time , and finally they replied ...
,, 
,,  i wanted a copy of the perl logs , but they said that perl doesn't make
,, logs! , is this true , or should i be flaming there asses off right now?


Perl doesn't make logs. Of course not. What language does make logs?
If you want to make logs, you've to make them yourselves.



Abigail
-- 
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 03 Jun 1999 19:48:42 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: The artistic license and perl:
Message-Id: <ylu2sod6k5.fsf@windlord.stanford.edu>

Chris Nandor <pudge@pobox.com> writes:
> tchrist@mox.perl.com (Tom Christiansen) wrote:

>> but want clarification.  Larry always manages to talk them into being
>> happy with it all.

> Perhaps Larry should publish a paper on the AL.

Perhaps Larry could fix the license so that people don't have to keep
asking for clarification of it?

-- 
#!/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: 03 Jun 1999 20:02:25 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: The artistic license and perl:
Message-Id: <ylr9nsd5xa.fsf@windlord.stanford.edu>

Tom Christiansen <tchrist@mox.perl.com> writes:

> But it's important.  There have been very large companies whose lawyers
> have contacted Larry for clarification.  They aren't allowed to touch
> the GPV (why why WHY won't people understand this issue?), so have to
> use the AL, but want clarification.

That indicates a bug in the license.  A license that routinely has people
asking for clarification is just like a Perl script that produces warnings
under -w.  It may not be an *actual* problem, but it could be, and it
should be cleaned up anyway on general principles.

Examples:

|       "Reasonable copying fee" is whatever you can justify on the basis
|       of media cost, duplication charges, time of people involved, and
|       so on.  (You will not be required to justify it to the Copyright
|       Holder, but only to the computing community at large as a market
|       that must bear the fee.)

In practice, this is going to mean "charge anything you want."  There is
no computing community as a legal entity, and therefore no one to object
if you charge several hundred thousand dollars.

| 3. You may otherwise modify your copy of this Package in any way,
| provided that you insert a prominent notice in each changed file stating
| how and when you changed that file, and provided that you do at least
| ONE of the following:
| 
|     a) place your modifications in the Public Domain or otherwise make
|     them Freely Available, such as by posting said modifications to
|     Usenet or an equivalent medium, or placing the modifications on a
|     major archive site such as uunet.uu.net, or by allowing the
|     Copyright Holder to include your modifications in the Standard
|     Version of the Package.

In other words, you can modify the software package and distribute the
modified version and make your modifications proprietary.  In other words,
this provision lets you create a proprietary fork of Perl.

How?  Note the definition of Freely Available:

|       "Freely Available" means that no fee is charged for the item
|       itself, though there may be fees involved in handling the item.
|       It also means that recipients of the item may redistribute it
|       under the same conditions they received it.

Nowhere here does it say anything about *use*.  So you charge a licensing
fee per use of the modified version of Perl and make people purchase a
license to use it.  Note also that freely available just requires that the
modifications be available "under the same conditions they received it"
and there is no limit placed on the handling charges, so you can charge
several thousand dollars for the patch *and require that anyone
redistributing it do the same thing*.

The additional mechanisms by which you can make your modifications freely
available mentioned in (a) above are useless in preventing this, since
they're presented as non-comprehensive options and clarifications, not as
definitions.

Here's another way of forking a proprietary version of Perl:

| 5. You may charge a reasonable copying fee for any distribution of this
| Package.  You may charge any fee you choose for support of this Package.
| You may not charge a fee for this Package itself.  However, you may
| distribute this Package in aggregate with other (possibly commercial)
| programs as part of a larger (possibly commercial) software distribution
| provided that you do not advertise this Package as a product of your
| own.  You may embed this Package's interpreter within an executable of
| yours (by linking); this shall be construed as a mere form of
| aggregation, provided that the complete Standard Version of the
| interpreter is so embedded.

So you write some trivial little wrapper around the Perl interpretor that
changes a command-line option or something, and then distribute it as
proprietary software.  Note that this point gives you explicit permission
to distribute this Package provided that you satisfy the conditions of
this point.  *You don't need to satisfy any other conditions because it
doesn't say that you have to.*  That means that the restrictions and
conditions in 3 and 4 *do not apply* if you use point 5 as your
justification for distribution.

6 and 7 don't have actual loopholes that I see, but are imprecise enough
that I can imagine a lot of corporate lawyers getting scared off by them.
It's not clear exactly what they cover.

And finally this:

| 8. Aggregation of this Package with a commercial distribution is always
| permitted provided that the use of this Package is embedded; that is,
| when no overt attempt is made to make this Package's interfaces visible
| to the end user of the commercial distribution.  Such use shall not be
| construed as a distribution of this Package.

I don't know *what* that means, and it would be horribly expensive to
establish any particular meaning in court.  A lawyer aiming at doing nasty
things to Perl could do all sorts of things with this point just because
it's not at all clear what it's even talking about.

-- 
#!/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: 03 Jun 1999 20:06:15 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: The artistic license and perl:
Message-Id: <ylogiwd5qw.fsf@windlord.stanford.edu>

Chris Nandor <pudge@pobox.com> writes:
> Greg Bartels <gbartels@xli.com> wrote:

>> how many companies look at the AL and dont even bother calling Larry,
>> and scrap the idea entirely?

> I can't think it would be very many.  And I wager it would be fewer than
> the number of those that would scrap GPL'd software because of the GNU
> GPL.

That's not the issue.  I think we all agree there are problems with the
GPL for some uses that Perl can and should be put to.  That doesn't mean
that the Artistic License is correctly accomplishing its goals.

-- 
#!/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: 3 Jun 1999 22:01:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: turn cache off in IE
Message-Id: <slrn7legpp.im9.abigail@alexandra.delanet.com>

Nick Lee (leenick@interchange.ubc.ca) wrote on MMCII September MCMXCIII
in <URL:news:37569960.33FD5603@interchange.ubc.ca>:
~~ Hi,
~~ 
~~ Anyone knows how to turn OFF the cache in IE? I've tried using the
~~ header called Pragma (with a value of "no-cache"), but it seems to
~~ work only in NS, not in IE. IE still cache the document and doesn't
~~ reload unless I press 'refresh' explicitly.


And your Perl question is?


For browser questions, please ask in alt.fan.samantha-fox, the more
obvious place to ask.




Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 3 Jun 1999 22:03:35 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: while (@myarr)
Message-Id: <slrn7legte.im9.abigail@alexandra.delanet.com>

jbell@263.net (jbell@263.net) wrote on MMCII September MCMXCIII in
<URL:news:7j52hq$6hk$1@nnrp1.deja.com>:
() when I say,
() 
() my @myarr = (1,2,3,4);
() print $_ while @myarr;
() 
() According to the Camel book, this should be okay.
() But it doesn't print 1234 as I expected. To top if off,
() it runs into a infinite loop and says " Uninitialized variable..."
() What seems to be the problem?


2 things. 1) $_ is never set, hence you are trying to print an
unitialize variable. 2) @myarr never changes, so @myarr is always
true, and hence the loop never stops.

Perhaps you want:
      print $_ for (@myarr);


Abigail
-- 
perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 3 Jun 1999 20:57:33 -0500
From: "Jay" <IMNOT@ZHOMEZ.COM>
Subject: Re: You can earn $50,000 by learning programming skills and applying yourself
Message-Id: <7j7brj$jvu$1@gandalf.ocslink.com>


Dan Hinojosa wrote in message <7j75tb$2o2$1@news.laserlink.net>...
>
>MONEY <money@moneymaker.com> wrote in message
>news:31059903.3824@moneymaker.com...
>>
>>                                 THE PROGRAM
>>                 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
>>
>>                    INCREDIBLE $0 to $50,000 in 90 days!!!
>>
>> Dear Friend,
>>
>> You can earn $50,000 or more in next the 90 days sending e-mail. Seem
>> impossible? Read on for details.
>>
>
>This is no joke!  I was pennyless in 1990, and then I learned C++ and Java,
>and all of a sudden it all came together.  All of a sudden, I had respect
>for myself, and I was making $50,000 and more.  The best part about it, is
>that I didn't have to lower my dignity and annoy people with high IQs that
>wouldn't fall this swindle anyway!
>
>Love,
>Digital Priest
>
>
This sounds great!!!!!!!!  I'll buy anything you have right now!  Just
charge it, ok?




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

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

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