[18845] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1013 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 29 14:06:05 2001

Date: Tue, 29 May 2001 11:05:12 -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: <991159511-v10-i1013@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 29 May 2001     Volume: 10 Number: 1013

Today's topics:
        Accessing Oracle via Perl through HTML Framset <mark.l.phillips@bt.com>
    Re: Accessing Oracle via Perl through HTML Framset <todd@designsouth.net>
    Re: columns <todd@designsouth.net>
    Re: Creating a file based on a template with scalar val <godzilla@stomp.stomp.tokyo>
    Re: END{} and tempfiles (Abigail)
    Re: exec script w/require & headers (BUCK NAKED1)
    Re: FAQ 5.23:   How do I print to more than one file at <iltzu@sci.invalid>
        hang using filehandles for processes (thomas c jones)
    Re: HELP with IPC <dennis.kowalsk@daytonoh.ncr.com>
    Re: How would have solved this problem? <steffi@shell8.ba.best.com>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Newbie: locating files in apache nobull@mail.com
    Re: Perl Community Stars (?) <lmoran@wtsg.com>
    Re: Perl script error during testing <sloon@mindless.com>
    Re: Question about substitution in perl (felan)
    Re: Question about substitution in perl nobull@mail.com
    Re: Question about substitution in perl nobull@mail.com
    Re: redirect <todd@designsouth.net>
    Re: redirect <juan@schwindt.com.ar>
    Re: redirect <todd@designsouth.net>
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Stripping a string down to aplhaNumeric characters/ <james@NOSPAMPLEASEthesinner.co.uk>
    Re: Stripping a string down to aplhaNumeric characters/ (Craig Berry)
        Variables and Precedence Gordon.Haverland@gov.ab.ca
    Re: what does this mean? <todd@designsouth.net>
    Re: writing to text files using forms <lying_happy_eyes@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 29 May 2001 17:14:07 +0100
From: "Mark Phillips" <mark.l.phillips@bt.com>
Subject: Accessing Oracle via Perl through HTML Framset
Message-Id: <9f0i1k$i3v$1@pheidippides.axion.bt.co.uk>

Hello All

I am using a Windows NT workstation to access an Oracle 8 database which is
situated on a Windows
NT server.

I am trying to connect remotely to Oracle 8 on the server.  Accessing the
database with perl scripts in a web browser is not a problem, however
accessing the database using perl scripts called through a HTML frameset is
a problem. When I look at the Oracle db logs on the server, the username
that  appears is a single "/".  Normally I would expect to see my NT
username (we are using Oracle NT authentication).

Is their a way in oracle whereby I can set my username to "/".

Thank you

Mark







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

Date: Tue, 29 May 2001 16:50:06 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: Accessing Oracle via Perl through HTML Framset
Message-Id: <2rQQ6.83782$I5.19811957@news1.rdc1.tn.home.com>


"Mark Phillips" <mark.l.phillips@bt.com> wrote in message
news:9f0i1k$i3v$1@pheidippides.axion.bt.co.uk...
> Hello All
>

 ....

>
> Is their a way in oracle whereby I can set my username to "/".
>

Sounds like a question for the Oracle newsgroup




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

Date: Tue, 29 May 2001 17:00:31 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: columns
Message-Id: <PAQQ6.83786$I5.19817254@news1.rdc1.tn.home.com>


"Jürgen Exner" <juex@my-deja.com> wrote in message
news:3b0bcf23@news.microsoft.com...
> "Willem" <smitw1@hotmail.com> wrote in message
> news:1b8ngtc02ut15ft0vij7uka2o1rt6bb28h@4ax.com...
> > I want to split records of a file into colums, and with a space
> > between the colums.
> >
> > Input from file:
> >
>
02X123593791Y103970930X123593791Y103970930X123593791Y103970930X123593791Y103
> 97093000
> > etc.
> >
> > output to file:
> > 02 X123593791 Y103970930 X123593791 Y103970930 X123593791 Y103970930
> > X123593791 Y103970930 00
>
> A simple substitute should do:
>     s/\([XY]\)/ $1/g
>

What's up with those escaped parenthesis? That would make it match actual
parenthesis in the string. There aren't any, so the match would fail.




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

Date: Tue, 29 May 2001 08:57:09 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Creating a file based on a template with scalar value
Message-Id: <3B13C6D5.C406100D@stomp.stomp.tokyo>

Michael wrote:

(snippage)

> ...I am having a problem where my script needs to send an email
> with a username in it, based on a text file....
 
> An example of the text file is:
 
> ----
> Welcome. This is an email.
 
> Your name is $name
 
> Regards
> Some script processing bot.
> ----
 
> The section of the perl script that needs to work this is:
 
(snipped code)

You have asked for some pointers. Use of a single template file
is most often not a good idea. Doing this requires invoking a
file open and read, processing and so forth. This reduces script
efficiency significantly. You will do better to include your
template directly within your script.

Contrasting this, if there is a need for multiple templates,
one of which is to be selected based upon criteria, it is
better to have template files to avoid a lot of clutter within
your script, given your templates are complex and large. This
does reduce script clutter but also reduces script efficiency.

In general, use of templates is a poor choice in programming.
Additionally, using variable formats, your $name variable, in
a template file is not a good choice. This requires evaluation
of your text based variables; even less efficiency.

Change your $name format in your template to a format similar to:

   ¦name¦
   
   ¦user¦

There is no need for variable interpolation doing this. Watch...

$name = "Kiralynne";
$user = "Godzilla";

&Format;

sub Format
 {
  local ($/);
  open (TEMPLATE, "template.txt");
  $template = <TEMPLATE>;
  close (TEMPLATE);
  $template =~ s/¦name¦/$name/g;  ## g if multiple instances
  $template =~ s/¦user¦/$user/g;  ## ditto
 }

This $template variable is now formatted and ready to
be used in an appropriately coded send email routine.
You may also adapt a while loop to this style and
print directly to your email to be sent. However,
your template most likely will be very small and
better suited for single string treatment.

You see? No need to create and open a temporary file.
Incidently, these temporary files you create in your
code, will they always be on your hard drive? You have
no facility to unlink or delete these files when you
are finished using them. They will accumulate, yes?
With your rand set to ten-thousand, well... ahem.

If your template is short and sweet, if you are using
multiple templates which are not too complex and large,
consider including your template or templates, directly
within your script. This affords greatest efficiency.

Godzilla!


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

Date: Tue, 29 May 2001 15:39:17 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: END{} and tempfiles
Message-Id: <slrn9h7gl5.efq.abigail@tsathoggua.rlyeh.net>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MMDCCCXXVIII
September MCMXCIII in <URL:news:9ev2hh$6ns$1@agate.berkeley.edu>:
$$  [A complimentary Cc of this posting was sent to
$$  Abigail
$$ <abigail@foad.org>], who wrote in article <slrn9h5nr1.fv8.abigail@tsathoggua.rlyeh.net>:
$$ > opened. But then you still have a problem if END {} isn't run,
$$ > for instance when doing an exec, or a kill -9. Better might be to
$$ > unlink the file right after opening. It'll get deleted as soon as
$$ > the program finishes, for whatever reason.
$$  
$$  Will not work on most of the systems.

Irrelevant.


It will work on Solaris, the system the OP uses.



Abigail
-- 
$_ = "\nrekcaH lreP rehtona tsuJ"; my $chop; $chop = sub {print chop; $chop};
$chop -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ()
-> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ()


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

Date: Tue, 29 May 2001 12:18:07 -0500 (CDT)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: exec script w/require & headers
Message-Id: <29874-3B13D9CF-217@storefull-242.iap.bryant.webtv.net>

 
Re: exec script w/require & headers   
 
> see-sig@from.invalid (David=A0Efflandt) 
>> dennis100@webtv.net wrote: 
>> How do I get rid of the headers. When >> I use 
>> require "pcount.pl"; 
>> within another script, it executes 
>> "pcount.pl" as desired, but prints the  >> content headers. FWIW, I
have =A0 
>> require "pcount.pl" =A0 right before my 
>> END block. 

> Think a little. Modify pcount.pl to NOT 
> print headers, or only when needed.

Excuse me, but I "think", "do think", and "have thought". I thought of
that solution already. I am also using pcount.pl for other files and
therefore do not wish to change that file. I got it to work though just
by using embed src. Of course, I could've used SSI or another solution
too; but prefered a perl solution... thus the question posted here.

> There is another newsgroup for CGI questions. 

David Effandt... who said anything about CGI? You assume too much.

Regards,
--Dennis



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

Date: 29 May 2001 16:44:19 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: FAQ 5.23:   How do I print to more than one file at once?
Message-Id: <991152902.29084@itz.pp.sci.fi>

[A copy of this message has been mailed to <faq@denver.pm.org>.]

In article <x9HQ6.209$E_i.214695424@news.frii.net>, PerlFAQ Server wrote:
>+
>  How do I print to more than one file at once?
>
 [snip]
>        for $fh (FH1, FH2, FH3) { print $fh "whatever\n" }
 [snip]
>        open (FH, "| tee file1 file2 file3");
 [snip]
>    Otherwise you'll have to write your own multiplexing print function--or
>    your own tee program--or use Tom Christiansen's, at
>    http://www.perl.com/CPAN/authors/id/TOMC/scripts/tct.gz , which is

Should there not be a mention of the IO::Tee module?  Maybe something
like this (sample code based on the IO::Tee docs)?

=pod

=head2 How do I print to more than one file at once?

One way is to use the IO::Tee module from CPAN:

    use IO::Tee;
    my $tee = IO::Tee->new(\*STDOUT, $fh, ">file.txt");
        or die "Error teeing output: $!\n";
    print $tee "whatever\n";

This way anything printed to C<$tee> will be written to the filehandles
C<STDOUT>, C<$fh>, and to the file named "file.txt".

Another way to connect up to one filehandle to several output
filehandles is to use the tee(1) program if you have it, and let it take
care of the multiplexing:

    open (TEE, "| tee >file1 file2 file3") or die "Teeing: $!\n";

Or even:

    # make STDOUT go to three files, plus original STDOUT
    open (STDOUT, "| tee file1 file2 file3") or die "Teeing: $!\n";
    print "whatever\n";
    close (STDOUT) or die "Closing tee: $!\n";

=cut

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: 29 May 2001 08:49:55 -0700
From: tjones@timetra.com (thomas c jones)
Subject: hang using filehandles for processes
Message-Id: <97c00ccc.0105290749.54beefe@posting.google.com>

Hello,

On Win2K, since fork() is not quite ready for prime time, I'm using
filehandles for processes.  I do, say,

use FileHandle;
 ...
$FILEHANDLE = new FileHandle ("my_program.exe|");

The problem comes when I try to do any operation (close, read) on
$FILEHANDLE.

The program hangs on the operation until I do <ctrl>-C.

Any ideas what I might be doing wrong?

Thanks, Tom


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

Date: Tue, 29 May 2001 11:46:20 -0400
From: "Dennis Kowalski" <dennis.kowalsk@daytonoh.ncr.com>
Subject: Re: HELP with IPC
Message-Id: <3b13c44d$1@rpc1284.daytonoh.ncr.com>

> According to Dennis Kowalski <dennis.kowalsk@daytonoh.ncr.com>:
> > The $queue = msgget($key,0) statment is in the 2nd script. The one that
> > wants to get the ID value to be used in the send. I have verified that
the
> > first script (which does use IPC_CREAT) did create the queue with the
proper
> > permissions by doing a ipcs -qa command.
>
> Then you should give us a clearer image of your setup.  Post a pair
> of minimal scripts that show the error, and explain where it happens.
>

OK

Here is the code from script #1 which creates the IPC queue.

eval 'sub IPC_CREAT {0001000}' unless defined &IPC_CREAT;
eval 'sub IPC_NOWAIT {0004000}' unless defined &IPC_NOWAIT;

$key = 999;
$queue = msgget($key, &IPC_CREAT | 0777);

Here is the ouput of the ipcs -qa command that shows that the IPC queue was
created. The id is 2004

dennis> ipcs -qa | grep dkow
q   2004 0x000003e7 --rw-rw-rw- dkowalsk  sysarch dkowalsk  sysarch      0
0
  65535     0     0 no-entry no-entry  8:39:51


Here is the code from script #2 which is trying to send a message to an IPC
queue which has been created by  script  #1 which previously ran.

I get an error of Invalid argument.

I have tried msgsnd and the SysV $msg->snd methods and both fail.

Can anyone see the error?

Here is the msgsnd version

      eval 'sub IPC_RMID {0}' unless defined &IPC_RMID;
      eval 'sub IPC_NOWAIT {0004000}' unless defined &IPC_NOWAIT;

      $key = 999;
     $queue = msgget($key, 0);

# this does return the proper id of the ipc queue
# $queue contains the id of 2004

     $message = pack("La*", 0, "XXXXXX");

# now I doe the send and get the error

     $stat = msgsnd($queue, $message, &IPC_NOWAIT) or
       die "Can not send message: $!";

Can not send message: Invalid argument at ipc2.pl line 15, <IN> chunk 3.
debugged program terminated.  Use q to quit or R to restart,

Here is the SysV version of the sending script

   $key = 999;
   $queue = new IPC::Msg($key,0);
   $message = pack("La*", 0, "XXXXXX");
   $stat = $queue->snd($message,0);
msg->snd( TYPE, BUF, FLAGS ) at ipc3.pl line 19
       Carp::croak('$msg->snd( TYPE, BUF, FLAGS )') called at
/usr/local/lib/pe
l5/5.00502/IPC/Msg.pm line 98
       IPC::Msg::snd('IPC::Msg=SCALAR(0x81b0ba4)', '^@^@^@^@XXXXXX', 0)
called
at ipc3.pl line 19
debugged program terminated.  Use q to quit or R to restart,

Thanks








> [jeopardectomy]
>
> Anno
>
> [1] Martien, can I borrow this?




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

Date: Tue, 29 May 2001 17:05:49 GMT
From: Robert Nicholson <steffi@shell8.ba.best.com>
Subject: Re: How would have solved this problem?
Message-Id: <yl37kz0qe4z.fsf@shell8.ba.best.com>

ebohlman@omsdev.com (Eric Bohlman) writes:

> Robert Nicholson <steffi@shell8.ba.best.com> wrote:
> > Fair enough point...
> 
> > The point I wanted to make about TokeParser was that if I read
> > a token and then put it back ie. unget it and read the next
> > token from the parser. It's not the one I just put back.
> 
> When you read the token, are you using get_token() or get_tag()?  Remember 
> that the latter returns a "stripped" token where the type entry has been 
> deleted and where the element name begins with a "/" if the token was an 
> end tag.  unget_token() isn't smart enough to recognize stripped tokens, 
> so if you try to push one back things get all messed up, since the next 
> call to get_token() (which is what get_tag() and get_text() use 
> internally) is going to expect the first entry in the token to be the type 
> entry.
> 
Well, I am ungetting a </table> and using get_token() and it doesn't
read the token I pushed back.

> Note that the current version of XML::TokeParser, which I wrote, also 
> suffers from this limitation, though it will be fixed in the next version.  
> I think it would be useful if Gisle would do the same thing to 
> HTML::TokeParser.


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

Date: Tue, 29 May 2001 15:57:43 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <th7hnne8umdg7c@corp.supernews.com>

Following is a summary of articles from new posters spanning a 8 day
period, beginning at 21 May 2001 16:53:20 GMT and ending at
29 May 2001 14:13:02 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2001 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  150 (36.8% of all posters)
Articles: 279 (19.2% of all articles)
Volume generated: 516.4 kb (19.1% of total volume)
    - headers:    225.3 kb (4,551 lines)
    - bodies:     287.6 kb (9,776 lines)
    - original:   193.7 kb (6,900 lines)
    - signatures: 3.2 kb (89 lines)

Original Content Rating: 0.673

Averages
========

Posts per poster: 1.9
    median: 1.0 post
    mode:   1 post - 89 posters
    s:      2.0 posts
Message size: 1895.2 bytes
    - header:     827.1 bytes (16.3 lines)
    - body:       1055.5 bytes (35.0 lines)
    - original:   710.9 bytes (24.7 lines)
    - signature:  11.7 bytes (0.3 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   14    21.7 ( 11.3/ 10.4/  4.9)  buggs <buggs@geekmail.de>
    9    16.1 (  8.5/  7.5/  2.4)  dball@bnb-lp.com
    6    16.3 (  6.1/ 10.3/  4.6)  "Daniel Robert" <drobert@caissepop.mb.ca>
    6    10.8 (  6.0/  4.8/  2.9)  "R" <smrtalec@nospam.earthlink.net>
    5     8.6 (  4.5/  4.1/  2.0)  Kris Verbeeck <kris.verbeeck@chello.be>
    5    13.8 (  3.6/ 10.1/  5.9)  Gary <grobitaille@mail.com>
    5    10.6 (  3.9/  6.5/  5.0)  /dev/null <postmaster@god.edu>
    5     9.5 (  4.5/  5.0/  3.1)  "vector" <cadmcse@hotmail.com>
    5     8.2 (  2.7/  5.5/  5.1)  felan_66@hotmail.com
    5     9.6 (  4.4/  5.2/  1.9)  ChokSheak Lau <chok@ece.gatech.edu>

These posters accounted for 4.5% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  21.7 ( 11.3/ 10.4/  4.9)     14  buggs <buggs@geekmail.de>
  16.3 (  6.1/ 10.3/  4.6)      6  "Daniel Robert" <drobert@caissepop.mb.ca>
  16.1 (  8.5/  7.5/  2.4)      9  dball@bnb-lp.com
  14.2 (  3.8/ 10.4/  6.0)      4  Joel <extramail@qwest.net>
  13.8 (  3.6/ 10.1/  5.9)      5  Gary <grobitaille@mail.com>
  11.1 (  1.9/  9.2/  8.5)      2  Jac@Oppers.nl
  10.8 (  6.0/  4.8/  2.9)      6  "R" <smrtalec@nospam.earthlink.net>
  10.6 (  3.9/  6.5/  5.0)      5  /dev/null <postmaster@god.edu>
  10.1 (  3.3/  6.9/  3.9)      4  Andras Malatinszky <nobody@dev.null>
   9.6 (  2.4/  7.2/  4.8)      3  G3CK0 <1@1.1>

These posters accounted for 5.0% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  1.4 /  1.4)      3  Grod <ggrothendieck@volcanomail.com>
0.995  (  1.3 /  1.3)      3  "Public <Anonymous_Account>" <remailer@xganon.com>
0.967  (  3.3 /  3.4)      3  "RoadRunner" <newwave@ACMEmail.net>
0.922  (  5.1 /  5.5)      5  felan_66@hotmail.com
0.794  (  2.5 /  3.1)      3  Jill <jmjlampert@aol.com>
0.775  (  5.0 /  6.5)      5  /dev/null <postmaster@god.edu>
0.755  (  2.0 /  2.7)      3  "Robert" <pettyr_no_spam@hotmail.com>
0.702  (  1.4 /  2.0)      4  Ilmari Karonen <usenet11467@itz.pp.sci.fi>
0.700  (  0.7 /  1.0)      3  Andreas Schmitz <webmaster@kreativhaus-online.de>
0.674  (  4.8 /  7.2)      3  G3CK0 <1@1.1>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.527  (  2.4 /  4.6)      3  "Kevin Hancock" <KevinHancock@arcom.com.au>
0.490  (  2.0 /  4.1)      5  Kris Verbeeck <kris.verbeeck@chello.be>
0.470  (  4.9 / 10.4)     14  buggs <buggs@geekmail.de>
0.448  (  4.6 / 10.3)      6  "Daniel Robert" <drobert@caissepop.mb.ca>
0.446  (  0.9 /  2.1)      3  Joel Ray Holveck <joelh@juniper.net>
0.433  (  0.9 /  2.0)      3  Ilmari Karonen <usenet11470@itz.pp.sci.fi>
0.381  (  1.0 /  2.7)      3  "Eric Laramee" <sdozois@videotron.ca>
0.366  (  1.9 /  5.2)      5  ChokSheak Lau <chok@ece.gatech.edu>
0.321  (  0.6 /  1.8)      3  Willem <smitw1@hotmail.com>
0.319  (  2.4 /  7.5)      9  dball@bnb-lp.com

29 posters (19%) had at least three posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      36  alt.perl
      29  comp.lang.perl
      16  comp.unix.shell
      15  comp.lang.awk
       9  comp.lang.perl.tk
       9  comp.lang.perl.modules
       3  comp.object
       2  eug.comp.lang.perl
       2  tw.bbs.comp.lang.perl
       2  comp.lang.perl.moderated

Top 10 Crossposters
===================

Articles  Address
--------  -------

      12  "Daniel Robert" <drobert@caissepop.mb.ca>
       6  "Andrew Hamm" <ahamm.NO$PAM@sanderson.NO$PAM.net.au>
       5  "vector" <cadmcse@hotmail.com>
       3  Joel Ray Holveck <joelh@juniper.net>
       3  "Leona Browning" <leona_browning@hotmail.com>
       2  Cyrille Lefevre <clefevre%no-spam@redirect.to.invalid>
       2  Alain <alain_s75@hotmail.com>
       2  Kong Li <likong@us.sina.com>
       2  Raoul Callaghan <ausit@bigpond.net.au>
       2  Chris <chrisl_ak@hotmail.com>


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

Date: 29 May 2001 18:04:39 +0100
From: nobull@mail.com
Subject: Re: Newbie: locating files in apache
Message-Id: <u91yp8dr2w.fsf@wcl-l.bham.ac.uk>

harry macdonald <hmacdonald@europarl.eu.int> writes:

> Subject: Newbie: locating files in apache

Do not use the word "Newbie" in your subject header.  It will be read
by people round here as "person too lazy to read manuals" because in
pratice this is what it usually means in subject lines.

If this is true description of you then you should not post as all.
If this is an untrue description of you then you've needlessly turned
people against you before you even start.

> Hi, I hope someone can help me
 
> I'm porting from IIS to apache,

You would have been marginally better off posting this to a CGI
newsgroup as it's not really Perl related.  You would encounter the
exactly same issue porting CGI programs written in any language.

> and when opening datafiles
> (open(..."x/y/myfile" ...)
> With apache  the path is relative to the current directory.
> 
> How do I make it relative to the server root ?

Do you mean server root or do you really document root?

Apache makes the document root available in the environment variable
DOCUMENT_ROOT.  This has nothing to do with Perl.

In Perl you could make use this variable as follows:

  (open(..."$ENV{DOCUMENT_ROOT}/x/y/myfile" ...)

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Tue, 29 May 2001 11:33:59 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: Perl Community Stars (?)
Message-Id: <g8g7htcj9d16ugkf7i9sei60utvcpm75v9@4ax.com>

On Tue, 29 May 2001 15:03:52 GMT, "Todd Smith" <todd@designsouth.net>
wrote wonderful things about sparkplugs:

SNIP
>> --But there are famous programmers/authors.  Tom C, Randal S, Nathan
>> T.  Even infamous ones (Matt W, the troll.)
>>
>SNIP
>
>You forgot Abigail!
>
My list was not now, nor has it ever been all inclusive... those were
first three names on the bindings above my monitor!
--
BSOD? In my day we didn't have 0000FF!
lmoran@wtsg.com


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

Date: Tue, 29 May 2001 17:10:46 GMT
From: sloon <sloon@mindless.com>
Subject: Re: Perl script error during testing
Message-Id: <u5k7ht4quqlqr0vnegmvclcp1gphb0cb2k@4ax.com>

Tad,

Okay..I choose the wrong newsgroup in which to ask a question, however
I got an answer that I found acceptable. 

I thought that Perl was about doing things in a way that worked,
"getting the job done", not arguing about the number of angels that
could dance on the head of a pin.

 I am SO sorry to have disturbed your slumber, perhaps I should have
just cross-posted to 400 different groups and then started a flame-war
with anyone that responded.

I don't have my Discrete Mathematics text here , and I haven't looked
at it in MANY years, but I am under the impression that there is a
term for a proposition that is logically flawed. 

Abigail's proposition was logically flawed and she tried to imply that
the choice of venue for my question was of the same logical merit,
fortunately my query returned a logical result, whereas her's only
started a lot of ridiculous bickering

You remind me of an adolescent who desperately wants to appear
intelligent, but is only smart, and you probably don't know the
difference.



On Tue, 29 May 2001 09:40:28 -0400, tadmc@augustmail.com (Tad
McClellan) wrote:

>
>[ Jeopardectomy performed ]
>
>
>sloon <sloon@mindless.com> wrote:
>>Did you start this newsgroup? Are you the *official* bouncer here?On
>>Tue, 29 May 2001 02:54:25 +0000 (UTC), abigail@foad.org (Abigail)
>>wrote:
>>>sloon (sloon@mindless.com) wrote on MMDCCCXXVIII September MCMXCIII in
>>><URL:news:d026htkfpat00unduogeud22pueprm3pfi@4ax.com>:
>>>()  On Mon, 28 May 2001 23:59:53 +0000 (UTC), abigail@foad.org (Abigail)
>>>()  wrote:
>>>() >
>>>() >What makes you think this has anything to do with Perl?
>
>>>()  Perhaps I'm mistaken but I believe that I'm writing a script in Perl
>>>()  and as this newsgroup seems to deal with Perl in a genneral way, and
>>>()  is in fact named comp.lang.perl.misc, I pissed in your corn flakes
>>>()  somehow.
>>>
>>>Do you think your problem is relevant in rec.woodworking, because you
>>>were sitting on a wooden chair while developing your program?
>>>
>>>You didn't have any *Perl* problems with your setup, now did you?
>>>At least, you weren't discribing any.
>
>
>>No, rec.woodworking was not particularly relevant to my problem, 
>
>
>If you were not sitting on a wooden chair, then Abigail's predicate
>is not met, and the "then" clause does not apply.
>
>So what kind of chair _were_ you sitting on?
>
>
>>which
>>occurred while executing a *Perl* script, 
>
>
>which is as relevant to the problem you presented as what kind
>of chair you were sitting on. Exactly Abigail's point.
>
>
>>hence my decision to post
>>the question here. 
>
>
>So you choose the wrong newsgroup. That is understandable.
>
>What earned you negative score file points is the subsequent
>whining, not the initial mistake.
>
>
>>There were a number of groups that I could have posted the question
>>to, but I though that this might be a good place  
>
>
>But once it was pointed out that this was NOT a good place, you
>did not simply go to a "better" (web server related) place.
>
>You seem to be insisting that this place is a good place for
>web server questions. It is not. It is a good place for Perl
>questions. There are other newsgroups that are good places
>for asking server questions. Just go ask over there, that's
>where the folks that can help with such problems hang out.
>
>
>>and, as  one of the
>>replies that I received confirmed my initial assumption that it was a
>                                                              ^^^^^^^^
>>server-related issue,  I was correct.
> ^^^^^^^^^^^^^^^^^^^^
>
>Huh?
>
>That does not confirm that you chose the correct newsgroup. You
>chose the _Perl_ newsgroup for your _server_ question.
>
>It confirms that you chose the wrong newsgroup.
>
>
>>Gee, your life really is microscopic, isn't it. 
>
>
>Gee, you don't seem to appreciate the value of being able to
>partition your problem.
>
>You were concentrating on your problem being Perl related. That is
>a red herring. You should be concentrating on something related
>to your web server.
>
>You were looking for the cause of your problem in the wrong place.
>
>Knowing that it is not the right place is helpful in searching
>for the answer.
>
>
>>Do you really have nothing better to do than troll this newsgroup
>>berating people when they ask a question that you don't think is
>>relevant enough to *Perl*.
>
>
>You yourself admit above that it was not related to Perl.
>
>I am glad to find you agreeing with Abigail.
>
>
>>I haven't yet learned, as you apparently have, ABSOLUTELY
>>EVERYTHING that there is to know about *Perl*...
>
>
>I expect that you have no idea how close to the truth that is.
>
>Have you scanned the "Acknowledgments" section of the 3rd edition
>Camel book?
>
>
>>I have neither the
>>time nor inclination to spend all of my non-working time holed up in
>>my office pouncing on people who have a life outside of *PERL*.
>
>
>Yes, but wouldn't such a person be exactly the kind of person
>who is likely to be able to answer your Perl questions?
>
>Why go to the trouble of alienating folks who might help with future
>Perl questions, when simple silence would have left that opportunity
>available? You have unnecessarily limited your ability to get help
>in the future.
>
>
>>Yo are absurd, IMHO.
>
>
>You have cut off your nose to spite your face. So long.



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

Date: Tue, 29 May 2001 15:23:08 GMT
From: felan_66@hotmail.com (felan)
Subject: Re: Question about substitution in perl
Message-Id: <3b13bec6.9874748@news.uio.no>

On Tue, 29 May 2001 09:53:52 -0400, tadmc@augustmail.com (Tad
McClellan) wrote:

>>
>>print "Input file name: ";
>>chomp($infilename = <STDIN>);
>>print "Output file name: ";
>>chomp($outfilename = <STDIN>);
>>open(IN,$infilename) || die "cannot open $infilename for reading: $!";
>>undef($/);
>>$text = <IN>;   
>
>
>   {
>      local $/;   # defaults to undef anyway
>      $text = <IN>;
>   }
>   # now $/ has its "expected" value again ("\n").
>
>
>Note that $text now contains the entire file.
>
>
>>while (<$text>) {  
>
>
>Here you are trying to read input again, from some really strange
>indirect filehandle.
>
>You do not need to do any more input. You have already slurped the
>whole file.
>
>Lose the while() loop.
>
>

ok now it works fine the code is:

print "Input file name: ";
chomp($infilename = <STDIN>);
print "Output file name: ";
chomp($outfilename = <STDIN>);
open(IN,$infilename) || die "cannot open $infilename for reading: $!";
undef($/);
  {
      local $/;   # defaults to undef anyway
      $text = <IN>;
   }
$text =~ s/Apples\nand Oranges/Apples and Oranges/;
$text =~ s/Father/Mother/; 
open (OUT,">$outfilename") || die "cannot create $outfilename: $!";
print OUT $text;
close(IN); 
close(OUT);


it substitutes all the

Apples
and Oranges

for 

Apples and Oranges

and all the "Fathers" for "Mothers"

now another challange:

What I need now is a while function that allows the program to do
these substitutions on alle the .htm files in a given directory and
saves the result in .html files, ie. if the file name /doc/tree.htm is
substitued the result will go in /doc/tree.html

tnx again



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

Date: 29 May 2001 17:57:36 +0100
From: nobull@mail.com
Subject: Re: Question about substitution in perl
Message-Id: <u966ekdren.fsf@wcl-l.bham.ac.uk>

felan_66@hotmail.com (felan) writes:

> open(IN,$infilename) || die "cannot open $infilename for reading: $!";
> $text = <IN>;   # reads the whole file into $text

No it does not, please see FAQ: "How can I read in an entire file all
at once?"

See also numerous recent threads discussing the relative merits of
alternative approaches.

> while (<$text> {                                           

What is this?  What you you think that the <> operator does?  Compare
this with what the description in the manual says.

You probably meant

  for ($text) {

Which is basically the same as:

 { local *_=\$text;

i.e. makes $_ aka the "default scalar variable" (the one that s/// and
friends use by default) into an alias for $text for the duration of
the following block.

Some people regard this for(SCALAR){BLOCK} idiom as ugly and would
rather you used =~ personally I think it's rather cool.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 29 May 2001 18:02:24 +0100
From: nobull@mail.com
Subject: Re: Question about substitution in perl
Message-Id: <u94ru4dr6n.fsf@wcl-l.bham.ac.uk>

felan_66@hotmail.com (felan) writes:

> now another challange:

When you have an utterly unrelated question you should start the
process of researching the answer from scratch.  If after all the
usual checks you conclude that you need to post to Usenet you should
start a new thread with a subject line that relates to the new
question.

> What I need now is a while function that allows the program to do
> these substitutions on alle the .htm files in a given directory and
> saves the result in .html files, ie. if the file name /doc/tree.htm is
> substitued the result will go in /doc/tree.html

There is a standard module to "Call func for every item in a directory
tree".

The name of this module may not seem intuatively obvious unless you
have a Unix background where the shell command to do this is called
'find'.

Take a look at the list of available modules, if you don't know where
to look for that then see FAQ.

Note: whatever book/course you used to learn Perl was probably not
very good if it didn't mention this module.  You'll probably find a lot
of holes in your knowledge.   I suggest you take another course/get
another tutorial.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Tue, 29 May 2001 15:06:17 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: redirect
Message-Id: <JVOQ6.83760$I5.19761734@news1.rdc1.tn.home.com>


"Rob" <"relaxedrob@optushome.com.au"> wrote in message
news:OnNQ6.4924$25.17793@news1.eburwd1.vic.optushome.com.au...
> Howdy all!
>
> Is there a perl cgi method call that can redirect a browser?
>
> Thanks!
>
> Rob
>
>

If you don't want to load a whole module, just send this to your browser:

print "Content-type: text/html\n\n";
print "<meta http-equiv=refresh content="0; url=http://www.url.com">






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

Date: Tue, 29 May 2001 12:17:31 -0300
From: "Juan Schwindt" <juan@schwindt.com.ar>
Subject: Re: redirect
Message-Id: <9f0du1$9fi$1@news.unitel.co.kr>

There is a simpler way to do it: sending the "Location" header, for example:

print "Location: http://www.terra.com.ar/\n\n";

Juan Schwindt.


"Todd Smith" <todd@designsouth.net> wrote in message
news:JVOQ6.83760$I5.19761734@news1.rdc1.tn.home.com...
>
> "Rob" <"relaxedrob@optushome.com.au"> wrote in message
> news:OnNQ6.4924$25.17793@news1.eburwd1.vic.optushome.com.au...
> > Howdy all!
> >
> > Is there a perl cgi method call that can redirect a browser?
> >
> > Thanks!
> >
> > Rob
> >
> >
>
> If you don't want to load a whole module, just send this to your browser:
>
> print "Content-type: text/html\n\n";
> print "<meta http-equiv=refresh content="0; url=http://www.url.com">
>
>
>
>




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

Date: Tue, 29 May 2001 15:20:42 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: redirect
Message-Id: <e7PQ6.83762$I5.19767904@news1.rdc1.tn.home.com>


"Juan Schwindt" <juan@schwindt.com.ar> wrote in message
news:9f0du1$9fi$1@news.unitel.co.kr...
> There is a simpler way to do it: sending the "Location" header, for
example:
>
> print "Location: http://www.terra.com.ar/\n\n";
>
> Juan Schwindt.
>

Oh yeah! I forgot about that. Don't you need 3 newlines after it?




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

Date: Tue, 29 May 2001 15:57:38 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <th7hnilcch4m77@corp.supernews.com>

Following is a summary of articles spanning a 8 day period,
beginning at 21 May 2001 16:53:20 GMT and ending at
29 May 2001 14:13:02 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2001 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org

Totals
======

Posters:  408
Articles: 1450 (629 with cutlined signatures)
Threads:  363
Volume generated: 2699.9 kb
    - headers:    1209.4 kb (23,350 lines)
    - bodies:     1394.2 kb (45,666 lines)
    - original:   864.9 kb (31,236 lines)
    - signatures: 94.9 kb (2,134 lines)

Original Content Rating: 0.620

Averages
========

Posts per poster: 3.6
    median: 1.0 post
    mode:   1 post - 207 posters
    s:      7.5 posts
Posts per thread: 4.0
    median: 3 posts
    mode:   1 post - 101 threads
    s:      12.8 posts
Message size: 1906.7 bytes
    - header:     854.1 bytes (16.1 lines)
    - body:       984.6 bytes (31.5 lines)
    - original:   610.8 bytes (21.5 lines)
    - signature:  67.0 bytes (1.5 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   60   133.5 ( 53.2/ 79.5/ 58.0)  "Godzilla!" <godzilla@stomp.stomp.tokyo>
   47   133.7 ( 39.5/ 80.9/ 46.7)  Benjamin Goldberg <goldbb2@earthlink.net>
   47    83.0 ( 36.0/ 43.5/ 25.6)  nobull@mail.com
   43    86.5 ( 43.7/ 35.5/ 31.2)  abigail@foad.org
   43    57.8 ( 37.9/ 19.5/ 10.5)  Bart Lateur <bart.lateur@skynet.be>
   43    73.8 ( 33.7/ 40.1/ 17.5)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   40    90.3 ( 36.9/ 41.5/ 17.8)  Uri Guttman <uri@sysarch.com>
   37    75.4 ( 32.6/ 31.5/ 22.9)  Mark Jason Dominus <mjd@plover.com>
   33    45.8 ( 31.2/ 14.5/  8.3)  "Todd Smith" <todd@designsouth.net>
   32    70.9 ( 26.8/ 43.2/ 18.2)  "John W. Krahn" <krahnj@acm.org>

These posters accounted for 29.3% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 133.7 ( 39.5/ 80.9/ 46.7)     47  Benjamin Goldberg <goldbb2@earthlink.net>
 133.5 ( 53.2/ 79.5/ 58.0)     60  "Godzilla!" <godzilla@stomp.stomp.tokyo>
  90.3 ( 36.9/ 41.5/ 17.8)     40  Uri Guttman <uri@sysarch.com>
  86.5 ( 43.7/ 35.5/ 31.2)     43  abigail@foad.org
  83.0 ( 36.0/ 43.5/ 25.6)     47  nobull@mail.com
  75.4 ( 32.6/ 31.5/ 22.9)     37  Mark Jason Dominus <mjd@plover.com>
  73.8 ( 33.7/ 40.1/ 17.5)     43  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  70.9 ( 26.8/ 43.2/ 18.2)     32  "John W. Krahn" <krahnj@acm.org>
  69.8 ( 16.7/ 48.8/ 34.2)     28  Chris Stith <mischief@velma.motion.net>
  57.8 ( 37.9/ 19.5/ 10.5)     43  Bart Lateur <bart.lateur@skynet.be>

These posters accounted for 32.4% of the total volume.

Top 10 Posters by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  5.3 /  5.3)      8  Rafael Garcia-Suarez <rgarciasuarez@free.fr>
0.987  (  7.7 /  7.8)      8  "Scott R. Godin" <webmaster@webdragon.unmunge.net>
0.922  (  5.1 /  5.5)      5  felan_66@hotmail.com
0.879  ( 31.2 / 35.5)     43  abigail@foad.org
0.832  (  2.4 /  2.9)      5  Lou Moran <lmoran@wtsg.com>
0.791  ( 12.2 / 15.5)      7  Robert Nicholson <steffi@shell8.ba.best.com>
0.783  (  6.0 /  7.7)      5  isstb@flanet.com
0.776  ( 11.6 / 14.9)     12  Eric <nospam@xx.com>
0.775  (  5.0 /  6.5)      5  /dev/null <postmaster@god.edu>
0.773  (  2.7 /  3.4)      6  "Rob" <"relaxedrob@optushome.com.au">

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.436  ( 17.5 / 40.1)     43  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
0.428  ( 17.8 / 41.5)     40  Uri Guttman <uri@sysarch.com>
0.422  ( 18.2 / 43.2)     32  "John W. Krahn" <krahnj@acm.org>
0.419  (  2.6 /  6.3)      6  efflandt@xnet.com
0.405  (  2.6 /  6.5)     11  Tony Curtis <tony_curtis32@yahoo.com>
0.385  (  1.5 /  3.9)      6  Greg Bacon <gbacon@cs.uah.edu>
0.366  (  1.9 /  5.2)      5  ChokSheak Lau <chok@ece.gatech.edu>
0.345  (  1.2 /  3.4)      9  =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
0.319  (  2.4 /  7.5)      9  dball@bnb-lp.com
0.280  (  0.6 /  2.1)      5  Bob Moose <yogibearxx@bobmoose.com>

61 posters (14%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   43  module for combinatorics? (partitions etc)
   34  Array slice: how about the remainder?
   25  wwwboard.pl - Taint and Use Strict
   22  convert letters to numbers
   22  url parsing
   20  Match Parsing Glitch
   20  I don't want global variables ?
   18  Multiple Line printing
   16  sounder
   15  Search and replace text in a file based on a specific line

These threads accounted for 16.2% of all articles.

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  92.3 ( 37.3/ 50.8/ 31.9)     43  module for combinatorics? (partitions etc)
  91.4 ( 28.8/ 59.8/ 43.7)     34  Array slice: how about the remainder?
  53.4 ( 23.6/ 29.0/ 18.7)     25  wwwboard.pl - Taint and Use Strict
  49.0 ( 19.1/ 29.1/ 18.6)     20  Match Parsing Glitch
  41.2 ( 18.6/ 21.4/ 12.3)     20  I don't want global variables ?
  36.4 ( 20.2/ 15.0/  9.2)     22  convert letters to numbers
  36.3 ( 18.6/ 16.7/  9.1)     22  url parsing
  36.1 ( 15.9/ 19.0/  7.3)     15  Search and replace text in a file based on a specific line
  32.3 ( 15.0/ 16.1/  9.4)     18  Multiple Line printing
  30.1 ( 11.1/ 18.0/ 10.1)     13  Question on the "use strict" pragma

These threads accounted for 18.5% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.847  ( 13.9/  16.5)      5  How would have solved this problem?
0.835  (  5.4/   6.5)      5  Selectively output records from delimited file?
0.814  (  4.7/   5.7)      5  SCAN
0.780  (  4.8/   6.1)      6  why doesn't this regex do what I think it should?
0.763  (  8.6/  11.2)      6  Search and Replace
0.754  (  9.2/  12.2)     15  How can I convert a date (MM/DD/YYYY) to UTC time?
0.731  ( 43.7/  59.8)     34  Array slice: how about the remainder?
0.728  (  5.7/   7.9)      6  Building a source for Perl contracts
0.726  (  3.0/   4.1)      7  Regexp to match IP Address
0.726  (  3.2/   4.4)      6  perl history (*?)

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.440  (  5.1 / 11.5)      8  Time validation
0.431  (  4.5 / 10.5)      7  How to match and print like this ???
0.417  (  3.9 /  9.3)     10  setting priority from perl on linux
0.411  (  0.6 /  1.5)      6  Who's Going to the Perl Conference in San Diego this year?
0.385  (  2.9 /  7.6)     16  sounder
0.382  (  7.3 / 19.0)     15  Search and replace text in a file based on a specific line
0.364  (  1.7 /  4.6)      8  columns
0.350  (  1.4 /  4.0)      5  find executable files only
0.342  (  5.9 / 17.2)      9  How to match the password created in Linux shadow suite?
0.243  (  1.1 /  4.5)     10  SET-UP (free)

96 threads (26%) had at least five posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      36  alt.perl
      29  comp.lang.perl
      16  comp.unix.shell
      15  comp.lang.awk
       9  comp.lang.perl.tk
       9  comp.lang.perl.modules
       3  comp.object
       2  eug.comp.lang.perl
       2  tw.bbs.comp.lang.perl
       2  comp.lang.perl.moderated

Top 10 Crossposters
===================

Articles  Address
--------  -------

      12  "Daniel Robert" <drobert@caissepop.mb.ca>
       8  Michael Heiming <michael@heiming.de>
       6  Uri Guttman <uri@sysarch.com>
       6  "Andrew Hamm" <ahamm.NO$PAM@sanderson.NO$PAM.net.au>
       5  isstb@flanet.com
       5  "vector" <cadmcse@hotmail.com>
       4  "Scott R. Godin" <webmaster@webdragon.unmunge.net>
       4  "Leo" <leapius@hotmail.com>
       4  Graham Stow <graham@letsgouk.com>
       4  "John W. Krahn" <krahnj@acm.org>


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

Date: Tue, 29 May 2001 16:26:01 +0100
From: "James" <james@NOSPAMPLEASEthesinner.co.uk>
Subject: Re: Stripping a string down to aplhaNumeric characters/Using variables  in Reg Expressions
Message-Id: <9f0f8g$jn9$1@phys-ma.sol.co.uk>


Thanks John.

"John W. Krahn" <krahnj@acm.org> wrote in message
news:3B12FEF7.37631E0F@acm.org...
> "John W. Krahn" wrote:
> >
> > James wrote:
> > >
> > > Hey all,
> > >
> > > I am currently writing a website where I need a function that will
take a
> > > text string and strip it down to lower case AplhaNumeric charcaters
only.
> >
> > $text_string =~ tr/a-z//cd;
> >
> > > Is there any function that does that specially?
>
> Sorry, you said AlphaNumeric.
>
> $text_string =~ tr/a-z0-9//cd;
>
>
> John
> --
> use Perl;
> program
> fulfillment




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

Date: Tue, 29 May 2001 17:56:21 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Stripping a string down to aplhaNumeric characters/Using variables in Reg Expressions
Message-Id: <th7om5l9sudbcb@corp.supernews.com>

James (james@NOSPAMPLEASEthesinner.co.uk) wrote:
: I am currently writing a website where I need a function that will take a
: text string and strip it down to lower case AplhaNumeric charcaters only.

$text =~ tr/a-z0-9//cd;

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "God becomes as we are that we may be as he is."
   |               - William Blake


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

Date: Tue, 29 May 2001 17:11:05 GMT
From: Gordon.Haverland@gov.ab.ca
Subject: Variables and Precedence
Message-Id: <3b13d78e.19886755@news.gov.ab.ca>

Or, at least I think that's the subject.  I'm trying to puzzle out why
a perl CGI script is giving me errors.  Anyway, at one point the
script is printing

print "Location: ${URI}\n";

To my way of thinking, isn't ${URI} the same as $URI ???  It's only
this one variable which seems to be written this way.  Thanks for any
light you might shed on this.

Gord



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

Date: Tue, 29 May 2001 16:55:53 GMT
From: "Todd Smith" <todd@designsouth.net>
Subject: Re: what does this mean?
Message-Id: <twQQ6.83783$I5.19814503@news1.rdc1.tn.home.com>


"Mark Jason Dominus" <mjd@plover.com> wrote in message
news:3b0bbb9b.510b$1c3@news.op.net...
> In article <slrn9gmu2s.91g.vek@pharmnl.ohout.pharmapartners.nl>,
> Villy Kruse <vek@pharmnl.ohout.pharmapartners.nl> wrote:
> >I wonder: why do a web search if the documentation and manuals are all
> >installed locally?
>
> Why post to usenet if the manuals are all installed locally?
>

Why wash my car when it's going to rain some time in the future?




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

Date: Tue, 29 May 2001 19:02:30 +0100
From: "lying_happy_eyes" <lying_happy_eyes@hotmail.com>
Subject: Re: writing to text files using forms
Message-Id: <9f0o20$a3$1@plutonium.btinternet.com>

Erm, "he"? i'm actually a girl :)

The script seems absolutly perfect to me, but as YOU said i'm also pretty
new to perl (have been installing scripts since august '99 but not actually
writing anything at all (too scary!! ))

--
lying_happy_eyes
XXX
http://go.to/nypihas
http://balder.prohosting.com/thenyp/cgi-bin/ikonboard/ikonboard.cgi


"Pabu" <pabu@mn.mediaone.net> wrote in message
news:ZVKQ6.37695$V6.1952393@typhoon.mn.mediaone.net...
> > Link is fine, but I will need to see the script to say what is wrong!??
Or
> I
> > can try to dig out my own old script doing similar thing - it will take
> few
> > days though.
> > G.A.
>
> He had a link in the forum to the script he was using. I posted the code
for
> the script I created to do the same thing he was trying to do. You can
check
> out my code and see if you can find any security issues I may be unaware
of
> or something that might be wrong (I'm pretty new at cgi). I posted it in
the
> forum at his link. Let me know if you see anything you dont like about my
> script. Please. ;)
>
> Lee 'Pabu' Olsen
>
>




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

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


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