[19295] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1490 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 10 18:05:41 2001

Date: Fri, 10 Aug 2001 15:05:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <997481122-v10-i1490@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 10 Aug 2001     Volume: 10 Number: 1490

Today's topics:
    Re: Can'f find file sys\types.h in win32 distribution. <kalinabears@hdc.com.au>
    Re: Coercing list context onto pair of regexps in a com <brentdax1@earthlink.net>
    Re: Coercing list context onto pair of regexps in a com <uri@sysarch.com>
    Re: FAQ: full text version? me@sersa.omg
    Re: FAQ: full text version? <jurgenex@hotmail.com>
    Re: FAQ: full text version? (John J. Trammell)
        FAQ: How do I count the number of lines in a file? <faq@denver.pm.org>
        formating numbers <eric@mizuhocap.com>
    Re: formating numbers (Steven M. O'Neill)
    Re: formating numbers <eric@mizuhocap.com>
        Help - Substitution using a variable (pcsw2@hotmail.com)
    Re: Help - Substitution using a variable <rsherman@ce.gatech.edu>
    Re: How can I get variables interpeted in qw// ? (Stan Brown)
    Re: How can I get variables interpeted in qw// ? <pne-news-20010810@newton.digitalspace.net>
    Re: How could chomp the blanks of one sentence? anon@anon.com
    Re: how to verify $dir is null <ilya@martynov.org>
    Re: HOW: convert a string into an integer <m96@gmx.li>
    Re: HOW: convert a string into an integer <ren@tivoli.com>
    Re: HOW: convert a string into an integer <gnarinn@hotmail.com>
    Re: ipc::open3 and select (Jason Kawaja)
    Re: Learning Perl, 2nd Edition <wsegrave@mindspring.com>
    Re: Learning Perl, 2nd Edition <uri@sysarch.com>
    Re: Learning Perl, 2nd Edition <bart.lateur@skynet.be>
        need good book about reading text files (Ponzie B. Pogie)
    Re: Need PERL exp to t-shoot ad rotationa <bart.lateur@skynet.be>
    Re: new to Perl <jurgenex@hotmail.com>
    Re: new to Perl <Tassilo.Parseval@post.rwth-aachen.de>
    Re: new to Perl <bart.lateur@skynet.be>
    Re: new to Perl (Tad McClellan)
    Re: new to Perl <gnarinn@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 11 Aug 2001 04:54:35 +1000
From: "Sisyphus" <kalinabears@hdc.com.au>
Subject: Re: Can'f find file sys\types.h in win32 distribution.
Message-Id: <997505963.964124@clover.origin.net.au>


"Ted Allen" <eusdda@am1.ericsson.se> wrote in message
news:9l0v5q$a6k$1@abc.exu.ericsson.se...
> nmake for text-csv_xs needs sys/types.h.  Not in 5.6 or previous source
> release on in module package.
>
>

No, but I think 'types.h' is in VC++ 'vc98/include/sys/' folder - and if
you've run vcvars32.bat, then nmake should be able to find it there.
(Just check that it is there - it is on my VC++ 6.0.)

Cheers,
Rob




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

Date: Fri, 10 Aug 2001 19:10:10 GMT
From: "Brent Dax" <brentdax1@earthlink.net>
Subject: Re: Coercing list context onto pair of regexps in a comparison
Message-Id: <mkWc7.508$ZM2.32803@newsread2.prod.itd.earthlink.net>

"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:9l0v35$ql$2@mamenchi.zrz.TU-Berlin.DE...
> According to Brent Dax <brentdax1@earthlink.net>:
> > "pt" <mnemotronic@yahoo.com> wrote in message
> > news:da662010.0108091512.75f7c4d3@posting.google.com...
> > > I would like to force a pair of regular expressions to be evaluted in
> > > list context, so that they return $1.
> > >
> > > next unless ("\L$A" =~ /.*\.(.+)$/) eq ("\L$B" =~ m#.*/(.*)$#) ;
> > >             -----------------------    -----------------------
> > >
> > >   The goal is to compare the file extension portion of $A (after the
> > > '.') with the filename portion of $B (after the last '/' delimiter),
> > > and do something if equal/not equal.  List context for each regexp
> > > portion (underlined) will force each to return the grouped expression
> > > ($1) for the string comparison.
> >
> > What's wrong with just using m{(?<=\.).*$} and m{(?<=/).*$} ?
>
> Nothing is wrong, but unless I'm dense I don't see how it solves
> the problem.  We want to know if what the first .* matches is the
> same thing (modulo upper/lower case) the second .* matches.

    next unless m{(?<=\.).*$} eq m{(?<=/).*$};

Since the lookbehinds are used, the dot or slash isn't part of the RE--thus,
we don't need to force list context, we can just compare the return values
in scalar context directly.

> > m{
> >     (?<=    #backreference
>
> That's a lookbehind.  In regex parlance, a backreference is the usage
> of partial matches in other parts of a regex (what we do with \1 and
> friends).

I realized that last night.  Whooops.

For some reason my brain has gotten used to calling them
backreferences--I'll have to see if I can break that bad habit.  :^)

--Brent Dax
brentdax1@earthlink.net




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

Date: Fri, 10 Aug 2001 20:42:35 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Coercing list context onto pair of regexps in a comparison
Message-Id: <x78zgrmyth.fsf@home.sysarch.com>

>>>>> "BD" == Brent Dax <brentdax1@earthlink.net> writes:

  >> > > next unless ("\L$A" =~ /.*\.(.+)$/) eq ("\L$B" =~ m#.*/(.*)$#) ;
  >> > >             -----------------------    -----------------------
  >> > >
  >> > >   The goal is to compare the file extension portion of $A (after the
  >> > > '.') with the filename portion of $B (after the last '/' delimiter),
  >> > > and do something if equal/not equal.  List context for each regexp
  >> > > portion (underlined) will force each to return the grouped expression
  >> > > ($1) for the string comparison.

  BD>     next unless m{(?<=\.).*$} eq m{(?<=/).*$};


you seem to have lost the $A and $B variables. you need to do the
matches against them. and in the above example, you are comparing the
results of the match which is just a boolean test on the m// result
which is a boolean in scalar context. so the code above doesn't do
anything like the OP wanted.

  >> > m{
  >> >     (?<=    #backreference
  >> 
  >> That's a lookbehind.  In regex parlance, a backreference is the usage
  >> of partial matches in other parts of a regex (what we do with \1 and
  >> friends).

  BD> For some reason my brain has gotten used to calling them
  BD> backreferences--I'll have to see if I can break that bad habit.  :^)

and what do you call lookahead? forward references? :)

hmmm, insert here in the regex the text that will be matched later in
the future by this regex. could do some fancy stock market analysis with
that.

:)

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs  --------------------------  http://jobs.perl.org


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

Date: Fri, 10 Aug 2001 18:28:26 -0700
From: me@sersa.omg
Subject: Re: FAQ: full text version?
Message-Id: <ud29nt02kuqesr75rt4ra0r7bk37qop40q@4ax.com>

 "Complete text of these FAQ are available on request."

Could someone please post the full FAQ for a nearly new perlite.

Thanks



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

Date: Fri, 10 Aug 2001 11:39:35 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: FAQ: full text version?
Message-Id: <3b742a69@news.microsoft.com>

<me@sersa.omg> wrote in message
news:ud29nt02kuqesr75rt4ra0r7bk37qop40q@4ax.com...
> "Complete text of these FAQ are available on request."
>
> Could someone please post the full FAQ for a nearly new perlite.

I hope nobody is that crazy!
They are on your own HD, try "perldoc" or check your Perl installation
folder.

jue




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

Date: 10 Aug 2001 18:45:00 GMT
From: trammell@bayazid.hypersloth.invalid (John J. Trammell)
Subject: Re: FAQ: full text version?
Message-Id: <slrn9n7p4r.7j4.trammell@haqq.hypersloth.net>

On Fri, 10 Aug 2001 18:28:26 -0700, me@sersa.omg <me@sersa.omg> wrote:
>  "Complete text of these FAQ are available on request."
> 
> Could someone please post the full FAQ for a nearly new perlite.

The full FAQ is a bit large.  Here's a link to it.

  http://www.perldoc.com/perl5.6/pod/perlfaq.html



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

Date: Fri, 10 Aug 2001 18:17:00 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ: How do I count the number of lines in a file?
Message-Id: <wyVc7.14$V3.170984448@news.frii.net>

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.

+
  How do I count the number of lines in a file?

    One fairly efficient way is to count newlines in the file. The following
    program uses a feature of tr///, as documented in the perlop manpage. If
    your text file doesn't end with a newline, then it's not really a proper
    text file, so this may report one fewer line than you expect.

        $lines = 0;
        open(FILE, $filename) or die "Can't open `$filename': $!";
        while (sysread FILE, $buffer, 4096) {
            $lines += ($buffer =~ tr/\n//);
        }
        close FILE;

    This assumes no funny games with newline translations.

- 

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.

If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile.  If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.

Answers to questions about LOTS of stuff, mostly not related to
Perl, can be found by pointing your news client to

    news:news.answers

or to the many thousands of other useful Usenet news groups.

Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release.  It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.

The perlfaq manual page contains the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-1999 Tom Christiansen and Nathan
    Torkington.  All rights reserved.

This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.

                                                           05.03
-- 
    This space intentionally left blank


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

Date: Fri, 10 Aug 2001 16:21:54 -0400
From: Eric <eric@mizuhocap.com>
Subject: formating numbers
Message-Id: <3B744262.C70D6EA5@mizuhocap.com>

Is there a perl module that will add commas to
long numeric values for displaying and reporting?
Something that would convert 1000000 to 1,000,000

-Eric




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

Date: 10 Aug 2001 20:26:42 GMT
From: steveo@panix.com (Steven M. O'Neill)
Subject: Re: formating numbers
Message-Id: <9l1g22$19s$1@news.panix.com>

Eric  <eric@mizuhocap.com> wrote:
>Is there a perl module that will add commas to
>long numeric values for displaying and reporting?
>Something that would convert 1000000 to 1,000,000

perldoc -q commas
-- 
Steven O'Neill                                          steveo@panix.com
                                                       www.cars-suck.org


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

Date: Fri, 10 Aug 2001 17:27:49 -0400
From: Eric <eric@mizuhocap.com>
To: "Steven M. O'Neill" <steveo@panix.com>
Subject: Re: formating numbers
Message-Id: <3B7451D5.87556F41@mizuhocap.com>

Thank you.


"Steven M. O'Neill" wrote:

> Eric  <eric@mizuhocap.com> wrote:
> >Is there a perl module that will add commas to
> >long numeric values for displaying and reporting?
> >Something that would convert 1000000 to 1,000,000
>
> perldoc -q commas
> --
> Steven O'Neill                                          steveo@panix.com
>                                                        www.cars-suck.org



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

Date: 10 Aug 2001 12:25:58 -0700
From: pcsw2@hotmail.com (pcsw2@hotmail.com)
Subject: Help - Substitution using a variable
Message-Id: <fa78b2d2.0108101125.607b182f@posting.google.com>

Hi! What I'm trying to do is do a string substitution using a
variable, and it's not working.

I'm trying to achive the following:

    $line = "alias=\$COMPNAME";
    $COMPNAME = "ntsvr05";
    $line =~ s/\$COMPNAME/$var2/g;
    print "$line\n";

    Output:
      alias=ntsvr05

Using variables $var1 and $var2, this section of code does not return
the desired output:

    $line = "alias=\$COMPNAME";
    $COMPNAME = "ntsvr05";
    $var1 = "\$COMPNAME";
    $var2 = $COMPNAME;
    $line =~ s/$var1/$var2/g;
    print "$line\n";

    Output:
      alias=$COMPNAME

Which is not what I want.  Can anybody shed some light on my problem? 
What am I doing wrong?

Thanks!

Carsten.


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

Date: Fri, 10 Aug 2001 16:08:49 +0500
From: Robert Sherman <rsherman@ce.gatech.edu>
Subject: Re: Help - Substitution using a variable
Message-Id: <3B73C0C1.3AB95FBD@ce.gatech.edu>

"pcsw2@hotmail.com" wrote:
> 
> Hi! What I'm trying to do is do a string substitution using a
> variable, and it's not working.
> 
> I'm trying to achive the following:
> 
>     $line = "alias=\$COMPNAME";
>     $COMPNAME = "ntsvr05";
>     $line =~ s/\$COMPNAME/$var2/g;
>     print "$line\n";
> 
>     Output:
>       alias=ntsvr05
> 
> Using variables $var1 and $var2, this section of code does not return
> the desired output:
> 
>     $line = "alias=\$COMPNAME";
>     $COMPNAME = "ntsvr05";
>     $var1 = "\$COMPNAME";
>     $var2 = $COMPNAME;
>     $line =~ s/$var1/$var2/g;
>     print "$line\n";
> 
>     Output:
>       alias=$COMPNAME
> 
> Which is not what I want.  Can anybody shed some light on my problem?
> What am I doing wrong?
> 
> Thanks!
> 
> Carsten.

when using a variable to store a regex, try using qr, as in:

$re = qr/some_regex_to_be_stored/;
$line =~ s/$re/foobar/;

(you can read the gory details in perldoc perlop)

so (with debugging code inserted), your code becomes:

------------------------------------
$line = "alias=\$COMPNAME";
print "$line\n";
$COMPNAME = "ntsvr05";
print "$COMPNAME\n";
$var1 = qr/\$COMPNAME/; #change made here#
print "$var1\n";
$var2 = $COMPNAME;
print "$var2\n";
$line =~ s/$var1/$var2/g;
print "$line\n";
------------------------------------

and it outputs:

alias=$COMPNAME
ntsvr05
(?-xism:\$COMPNAME)
ntsvr05
alias=ntsvr05



--
robert sherman
css, cee
georgia institute of technology
atlanta, ga, usa


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

Date: 10 Aug 2001 14:10:14 -0400
From: stanb@panix.com (Stan Brown)
Subject: Re: How can I get variables interpeted in qw// ?
Message-Id: <9l1826$o2q$1@panix3.panix.com>

In <slrn9n80d3.18o.tadmc@tadmc26.august.net> tadmc@augustmail.com (Tad McClellan) writes:

>Stan Brown <stanb@panix.com> wrote:

>>How can I get a variable inetpeted in a qw// sequence?
>                          ^^^^^^^^^
>                          ^^^^^^^^^ interpolated, I assume?


>You can't.

>That suggests that you choose some other form of quoting.

>Can't offer more help than that, because you haven't told us
>what it is that you really need to accomplish.

>You can always do:

>   my @stuff = qw/zero one two/, $var, qw/four five six/;

OK, here is what I' trying to do. In the perlTK "widget" example code the
crete a Listbox with scrollbars like this:


				$entry = $Table->Scrolled(qw/Listbox 
							-height 1
							-relief 'sunken' 
							-width  "$$hash_pointer{$col}{'DATA_PRECISION'}
							-validate  'focusin' 
							-validatecommand  sub
           	           			{
       	            				Enter_entry_fields($col)
           	          			},
							-setgrid 1 -scrollbars e/);

except that the variable just gets passed as a string, and not interpeted.
How can I make this work?


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

Date: Fri, 10 Aug 2001 22:11:56 +0200
From: Philip Newton <pne-news-20010810@newton.digitalspace.net>
Subject: Re: How can I get variables interpeted in qw// ?
Message-Id: <ice8ntkbr1bf7uie0d3liopcvb9bfk97a7@4ax.com>

On 10 Aug 2001 14:10:14 -0400, stanb@panix.com (Stan Brown) wrote:

> OK, here is what I' trying to do. In the perlTK "widget" example code the
> crete a Listbox with scrollbars like this:
> 
> 
> 				$entry = $Table->Scrolled(qw/Listbox 
> 							-height 1
> 							-relief 'sunken' 
> 							-width  "$$hash_pointer{$col}{'DATA_PRECISION'}
> 							-validate  'focusin' 
> 							-validatecommand  sub
>            	           			{
>        	            				Enter_entry_fields($col)
>            	          			},
> 							-setgrid 1 -scrollbars e/);

Hm, I doubt that the example has it like that, because not only will the
$$hash_pointer{$col}{'DATA_PRECISION'} not work, the sub { ... } will be
interpreted not as an anonymous sub reference, but as four words (with a
comma after the fourth word! I think that produces a warning). Oh, and
the double quote before $$hash_pointer is not paired. And Perl doesn't
have pointers like C.

Something like this should work:

    $entry = $Table->Scrolled('Listbox',
                              -height     => 1,
                              -relief     => 'sunken',
                              -width  => $var->{$col}{'DATA_PRECISION'},
                              -validate   => 'focusin',
                              -validatecommand => sub {
                                 Enter_entry_fields($col)
                              },
                              -setgrid    => 1,
                              -scrollbars => 'e',
                             );

> the variable just gets passed as a string, and not interpeted.
> How can I make this work?

Don't put it inside the qw(). "Doctor, it hurts when I do this."

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


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

Date: Fri, 10 Aug 2001 18:11:59 +0000 (UTC)
From: anon@anon.com
Subject: Re: How could chomp the blanks of one sentence?
Message-Id: <9l185f$b2i$1@news3.cadvision.com>

Wenjie ZHAO wrote:
> Esp in front of the words, e.g. "    Hello    ", how
> could perl strip it to "Hello"?


The bottom of page 73 in "Programming Perl" (O'Reilly) gives

s/^\s*(.*?)\s*$/$1/

where the string is in $_


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

Date: 11 Aug 2001 01:04:02 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: how to verify $dir is null
Message-Id: <87lmkrpqyl.fsf@abra.ru>


HH> This is a simple question.   how to verify the $dir is uninitialized?
HH> The following code just doesn't work.
HH> [..skip..]

if(defined $dir) {
    print "Initialized\n";
} else {
    print "Uninitialized\n";
}

See 'perldoc -tf defined'

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)                                    |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/)                          |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Date: Fri, 10 Aug 2001 20:45:09 +0200
From: "m96" <m96@gmx.li>
Subject: Re: HOW: convert a string into an integer
Message-Id: <pan.2001.08.10.20.45.07.137.3416@gmx.li>

> i need to convert a string of "123" into an integer, so i can add it to
> another integer.
> 
> whats the command?

perldoc -f int


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

Date: 10 Aug 2001 14:12:01 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: HOW: convert a string into an integer
Message-Id: <m3r8ujafwe.fsf@dhcp9-161.support.tivoli.com>

On 10 Aug 2001, ebohlman@omsdev.com wrote:

> perl -e "print '123'+4"
> 127
> 
> (reverse the single and double quotes for Unix)

Actually, that works fine on Unix.  You only need to reverse them when
you have something the shell interpolates in a string, such as $var.

-- 
Ren Maddox
ren@tivoli.com


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

Date: Fri, 10 Aug 2001 21:05:21 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: HOW: convert a string into an integer
Message-Id: <997477521.163313297554851.gnarinn@hotmail.com>

In article <9l140c$jos$2@bob.news.rcn.net>,
Eric Bohlman <ebohlman@omsdev.com> wrote:
>
>perl -e "print '123'+4"
>127
>
>(reverse the single and double quotes for Unix)

why? works for me.

gnari




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

Date: Fri, 10 Aug 2001 20:58:33 +0000 (UTC)
From: kawaja@ece.ufl.edu (Jason Kawaja)
Subject: Re: ipc::open3 and select
Message-Id: <slrn9n8ipt.it.kawaja@kawaja.ece.ufl.edu>

nevermind, i figured it out.

-- 

/* Regards,
   Jason Kawaja, UF-ECE Sys Admin */



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

Date: Fri, 10 Aug 2001 13:01:30 -0500
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Learning Perl, 2nd Edition
Message-Id: <9l17vh$dsk$1@slb7.atl.mindspring.net>

"Haakon Riiser" <hakonrk@fys.uio.no> wrote in message
news:slrn9n7j46.9k.hakonrk@s.hn.org...
> I recently bought this book, and discovered shortly after that it had
> been obsoleted by the 3rd edition.  Are the changes in the 3rd edition
> significant?  I am thinking about returning the book, but I won't make
> a decision until I know if the changes are relevant to me.
>
> --
>  Haakon

FWIW, I had the same experience with the Camel book. ON discovering the
(remainered at Books-A-Million) 2nd edition I had bought was "obsolete", I
returned same for credit.

Later, actually, last month, I bought the (remaindered ...) Llama book, 2nd
edition, at the same place. I was happy to find it, as it is current for
Perl 5.004.

Luckily, the companion 2nd edition of the Camel book reappeared on the
closeout shelves at BAM last week, at which time, I corrected the
aforementioned error of returning the earlier purchase.

My recommendations:

1. Rush over to your nearest BAM to pick up a copy of the Camel book,
Programming Perl, 2nd Edition, so you'll have a consistent edition to go
with your Llama book, 2nd edition.

2. When you're ready for the latest editions, support Randall's work by
picking up the 3rd editions, which are the latest of both the Llama and
Camel books.

Bill Segraves
Auburn, AL

P.S. To Randall: Thank you! Thank you! Thank you!






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

Date: Fri, 10 Aug 2001 20:47:09 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Learning Perl, 2nd Edition
Message-Id: <x766bvmylv.fsf@home.sysarch.com>

>>>>> "WAS" == William Alexander Segraves <wsegrave@mindspring.com> writes:

  WAS> 2. When you're ready for the latest editions, support Randall's work by
  WAS> picking up the 3rd editions, which are the latest of both the Llama and
  WAS> Camel books.

randal was not an author of camel 3 (unlike 1 and 2 where he was an author).

  WAS> P.S. To Randall: Thank you! Thank you! Thank you!

and his name is spelled randal.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs  --------------------------  http://jobs.perl.org


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

Date: Fri, 10 Aug 2001 20:50:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Learning Perl, 2nd Edition
Message-Id: <vbi8nt0s4i7lajourkgmoqf9htph9i5qp6@4ax.com>

William Alexander Segraves wrote:

>P.S. To Randall: Thank you! Thank you! Thank you!

Then at least learn to spell his name right!   ;-)

-- 
	Bart.


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

Date: 10 Aug 2001 13:39:34 -0700
From: ponzie_b_pogie@hotmail.com (Ponzie B. Pogie)
Subject: need good book about reading text files
Message-Id: <cf0dac6.0108101239.6c9d7301@posting.google.com>

Does anyone know of a good perl book which goes in depth about reading
textfiles, navigating within those files, and generating reports? In
other words, manipulating the $_ variable. The books I have don't show
very much on it.  Thanks in advance.

PBP


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

Date: Fri, 10 Aug 2001 19:14:54 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Need PERL exp to t-shoot ad rotationa
Message-Id: <gcc8ntk6vj5f7atml280nsm8eobhlmh0ga@4ax.com>

Aceweb45 wrote:

>PERL is frequently crashing on us and causing UGL SSI errors.

What kind of server are you running on? If it's some kind of Windows
flavour, you should suspect "out of memory" errors. No, there's no fix.
Either get a better OS, or use a SSI mechanism that isn't as
memory-hungry as Perl.

-- 
	Bart.


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

Date: Fri, 10 Aug 2001 12:13:11 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: new to Perl
Message-Id: <3b74324d@news.microsoft.com>

[Please don't post jeopardy style]
"Hong Hsu" <honghsu@bellatlantic.net> wrote in message
news:3B743062.1000304@bellatlantic.net...
>    Thank you for the reply.  I keep getting error when #perldoc:
>
> [root@cheetah script]# perldoc -f -s
> Superuser must not run /usr/bin/perldoc without security audit and taint
> checks.
>
> Couldn't figure out why.

Well, guess what, it says right there: "Superuser must not run perldoc ...."

You may want to read up in the Unix FAQ about why it's a bad, bad idea to do
your day to day work on a root account.

jue

PS: this has nothing to do with Perl.




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

Date: Fri, 10 Aug 2001 21:14:02 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: new to Perl
Message-Id: <3B74327A.4000106@post.rwth-aachen.de>

[ Please post your reply _below_ the quoted text. It makes reading much 
easier ]

Hong Hsu wrote:
> 
> 
>         Ted,
> 
>   Thank you for the reply.  I keep getting error when #perldoc:
> 
> [root@cheetah script]# perldoc -f -s
> Superuser must not run /usr/bin/perldoc without security audit and taint 
> checks.
> 
> Couldn't figure out why.

Well, "Superuser must not run...". This should be obvious.
Either run it as user (pretty conventional under unices) or invoke it 
thus: 'perldoc -U -f -s'

Tassilo

-- 
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};



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

Date: Fri, 10 Aug 2001 19:17:57 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: new to Perl
Message-Id: <qrc8nt49qpotrhn6t04pf0flmaqe9t0jgu@4ax.com>

Hong Hsu wrote:

>I keep getting error when #perldoc:
>
>[root@cheetah script]# perldoc -f -s
>Superuser must not run /usr/bin/perldoc without security audit and taint 
>checks.
>
>Couldn't figure out why.

Is there ANY reason why you're atempting to do your day to day work as
superuser (AKA root)? That account is for *exceptional* cases only.

-- 
	Bart.


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

Date: Fri, 10 Aug 2001 14:49:13 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: new to Perl
Message-Id: <slrn9n8b59.1of.tadmc@tadmc26.august.net>


[ Oh crap. A stealth Cc. Please DO NOT DO THAT.

  <time passes while I go find the email reply that I sent...>
]


Hong Hsu <honghsu@bellatlantic.net> wrote:
>
>
>     Ted,


Yes Hung?


>    Thank you for the reply.  I keep getting error when #perldoc:
>
> [root@cheetah script]# perldoc -f -s
> Superuser must not run /usr/bin/perldoc without security audit and taint
  ^^^^^^^^^
  ^^^^^^^^^
> checks.
>
> Couldn't figure out why.


Please do not be offended by the below.



You should not have the root password.

You're not ready for that level of responsibility yet.


Do not do things as root unless they *require* that you be root.

Reading documentation is certainly not something that needs root's
permissions. I'm appalled that you even tried it...

Run perldoc as a normal user.



You tried to make a very serious security blunder.

Lucky for you that the author of the SW thought to check and refuse
to run as root.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Fri, 10 Aug 2001 20:08:42 +0000
From: gnari <gnarinn@hotmail.com>
Subject: Re: new to Perl
Message-Id: <997474122.707902170252055.gnarinn@hotmail.com>

In article <3B740658.8050005@bellatlantic.net>,
Hong Hsu  <honghsu@bellatlantic.net> wrote:
>
>I am writing my first Perl script. I wonder someone can point out what 
>is wrong with my script. I like to cd to a particular directory, get 5th 
>column of "ls -l", add them together (size of files). and then print it 
>out.  My questions are: how to get output from system() so that I can 
>use awk.  How to add value together.
>

your problem is that you have not discovered perldoc, a utility that
is installed along with perl, that helps you look up documentation.

do:
  perldoc -f system
to look at the documentation for the system() function. as it turns out,
if you read carefully, you will find that it says that system() actually is
the wrong command to use, and then goes on to say what to use.

good luck

gnari




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

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

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 V10 Issue 1490
***************************************


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