[13555] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 965 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 1 15:07:08 1999

Date: Fri, 1 Oct 1999 12:05:13 -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: <938804713-v9-i965@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 1 Oct 1999     Volume: 9 Number: 965

Today's topics:
    Re: Bye Tom? (WAS: Re: injecting "my" varibales into ca (Craig Berry)
    Re: Catching errors in anouther name space. <rootbeer@redcat.com>
    Re: Coding and encoding strings... (Larry Rosler)
    Re: Coding and encoding strings... <rhomberg@ife.ee.ethz.ch>
    Re: Coding and encoding strings... (Abigail)
    Re: Coding and encoding strings... <tech@tburg.net>
    Re: gcos/gecos (M.J.T. Guy)
    Re: GDBM access behave differently  when called from CG <rootbeer@redcat.com>
    Re: GDBM and PERL <dove@synopsys.com>
    Re: GDBM and PERL <jbc@shell2.la.best.com>
    Re: Getting the first occurence of a string <ddang@jhancock.com>
    Re: How do I get this to work? <ddang@jhancock.com>
        Installing modules <schulz@access.ch>
    Re: maybe... <laurensmith@sprynet.com>
        Not so sticky checkbox in CGI.pm (Bill Moseley)
    Re: RegEx for html->plain text sam@samredman.com
    Re: RegEx for html->plain text sam@samredman.com
    Re: RegEx for html->plain text (Abigail)
    Re: RegEx for html->plain text (Abigail)
    Re: RegEx for html->plain text (Abigail)
    Re: RegEx for html->plain text <sariq@texas.net>
    Re: RegEx for html->plain text <tech@tburg.net>
    Re: Runtime exception driving me crazy (Scott McMahan)
        system function and it's output <brett.keenan@compaq.com>
    Re: Understanding exec() (John Stanley)
    Re: Understanding exec() (Bill Moseley)
    Re: using tr? <rootbeer@redcat.com>
    Re: Validating email addresses. (Abigail)
    Re: Win32::API -- how to call functions using NULL poin eric_poulsen@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 01 Oct 1999 18:09:07 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Bye Tom? (WAS: Re: injecting "my" varibales into callers scope)
Message-Id: <rv9u637l3i518@corp.supernews.com>

Ala Qumsieh (aqumsieh@matrox.com) wrote:
: "Paul J. Lucas" <pjl@fuckoff.com> writes:
: > 	Since when does Tom deserve decency?
: 
: Then perhaps you shouldn't be consulting perldoc or any of the on-line
: perl docs and FAQs. You shouldn't be reading the Llama either, or the
: Camel, and certainly not the Ram. You shouldn't be reading the
: FMTEYEWTK series and shouldn't download the PPT.
: 
: Actually, you shouldn't be using Perl at all.

Last year, Tom C. posted rather vicious ad hominem attacks against me
because I questioned his position on free software.  I wrote him off at
that point.  Since then, my work has largely shifted from Perl to
server-side Java -- not through conscious choice, really, but I have had a
lingering slight distaste for Perl, thanks to Tom's tight association with
it.

So perhaps you're right.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "There it is; take it."  - William Mulholland


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

Date: Fri, 1 Oct 1999 11:12:00 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Catching errors in anouther name space.
Message-Id: <Pine.GSO.4.10.9910011109050.19155-100000@user2.teleport.com>

On Fri, 1 Oct 1999, Scott Beck wrote:

> > > Did you look at the code Tom?
> >
> > I saw what you posted. I didn't see what you didn't post.
> 
> What didn't I post?

I couldn't see the code in the modules you used. If there is an 'exit'
being used in one of those modules, that could be your problem. (There
shouldn't be one, but who knows?)

At this point, I recommend sprinkling lines like this

    warn "Got to checkpoint fleagle";

throughout your program. If you're using something which routes warnings
to your browser, you should be able to identify which line is the last one
to execute. Then, it should be (fairly) simple to track down what's
terminating your program.

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 1 Oct 1999 10:16:58 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Coding and encoding strings...
Message-Id: <MPG.125e8c62c3887d1a98a01b@nntp.hpl.hp.com>

In article <37F4C805.6789DD97@ife.ee.ethz.ch> on Fri, 01 Oct 1999 
16:41:09 +0200, Alex Rhomberg <rhomberg@ife.ee.ethz.ch> says...
> Bror Hellman wrote:
 ...
> > Which is the best way to do a rot13? Have someone
> > made a real nifty and elegant solution in perl?
> > I'm curious to see who made the best rot13.. ;-)
> 
> $_=uc;tr/A-MN-Z/N-ZA-M/;

Why are you gratuitously losing the case information?

    tr/A-Za-z/N-ZA-Mn-za-m/; 

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


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

Date: Fri, 01 Oct 1999 19:45:29 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Coding and encoding strings...
Message-Id: <37F4F339.3D04AF6D@ife.ee.ethz.ch>

Larry Rosler wrote:
> 
> In article <37F4C805.6789DD97@ife.ee.ethz.ch> on Fri, 01 Oct 1999
> 16:41:09 +0200, Alex Rhomberg <rhomberg@ife.ee.ethz.ch> says...
> > Bror Hellman wrote:
> ...
> > > Which is the best way to do a rot13? Have someone
> > > made a real nifty and elegant solution in perl?
> > > I'm curious to see who made the best rot13.. ;-)
> >
> > $_=uc;tr/A-MN-Z/N-ZA-M/;
> 
> Why are you gratuitously losing the case information?
> 
>     tr/A-Za-z/N-ZA-Mn-za-m/;

To make the encryption even better
- Alex

echo "Whfg nabgure Crey unpxre" | perl -pe 'tr/A-Za-z/N-ZA-Mn-za-m/'


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

Date: 1 Oct 1999 13:25:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Coding and encoding strings...
Message-Id: <slrn7v9vkv.1dd.abigail@alexandra.delanet.com>

Bror Hellman (m8100@abc.se) wrote on MMCCXXII September MCMXCIII in
<URL:news:7t29ch$18o@atle.abc.se>:
;; 
;; I wonder if anyone can give me some perlcode to do
;; UUencode, UUdecode and Base64 encoding/decoding.

Uhm, the Camel should tell you in either the pack or unpack section.

;; I'd like to write a sub each to do these codings 
;; and wondered if someone already did it.

There are modules doing this.

;; I found a module somewhwere that did this,
;; but I'm not allowed to use modules, my ISP
;; doesn't allow me, so I have to write them 
;; in ordinary perl instead.

I am confused. In which way aren't modules ordinary Perl? And what does
your ISP do, parse your files for 'use' and 'require' statements, and
then delete the files you are using/requiring? Get a different ISP.

;;                           I presume such
;; encoding/decoding can't be too complicated in perl.

Indeed. See the Camel. See the modules.

;; Also, I did several subs to make a rot13 substitution.
;; I really enjoyed making rot13 in perl.
;; 
;; Which is the best way to do a rot13? Have someone
;; made a real nifty and elegant solution in perl?
;; I'm curious to see who made the best rot13.. ;-)

Uhm, I'd use y[A-Za-z][N-ZA-Mn-za-m]; but that's just me....



Abigail
-- 
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


  -----------== 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: Fri, 01 Oct 1999 15:00:31 -0400
From: "Robert W. Byrd" <tech@tburg.net>
Subject: Re: Coding and encoding strings...
Message-Id: <37F504CF.DFAF37FF@tburg.net>

Alex Rhomberg wrote:
 
> echo "Whfg nabgure Crey unpxre" | perl -pe 'tr/A-Za-z/N-ZA-Mn-za-m/'

That should be:

echo "Whfg nabgure crey unpxre" | perl -pe 'tr/A-Za-z/N-ZA-Mn-za-m/'

 .rob. :)

-- 
Robert W. Byrd | Completely Computer Friendly
tech@tburg.net | 67-B Oxford St., Tillsonburg, ON CA N4G 2G3
------------------------------------------------------------
Nothing clever here          }|{         ereh revelc gnihtoN


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

Date: 1 Oct 1999 17:59:05 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: gcos/gecos
Message-Id: <7t2sp9$r91$1@pegasus.csx.cam.ac.uk>

Larry Rosler <lr@hpl.hp.com> wrote:
>
>Unix (described then as the UNIX(TM) Operating System) was developed 
>simultaneously at Bell Labs as a manageable, scalable, portable 
>alternative to the pachydermous Multics, on 16-bit DEC PDP-7 computers.  
                    ^^^^^^^^^^^^

Well, Multics always had to be pretty thick-skinned to survive all the
insults thrown at it.

But I don't remember the long grey trunk.


Mike Guy


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

Date: Fri, 1 Oct 1999 11:19:38 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: GDBM access behave differently  when called from CGI
Message-Id: <Pine.GSO.4.10.9910011118050.19155-100000@user2.teleport.com>

On Fri, 1 Oct 1999, Laurent.Laperrousaz wrote:

> I have a script that write to a GDBM file which works ok when started
> on a command line but fails to work when launched by Apache.

When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.

   http://www.perl.com/CPAN/
   http://www.cpan.org/
   http://www.cpan.org/doc/FAQs/cgi/idiots-guide.html
   http://www.cpan.org/doc/manual/html/pod/

> the message i get in the Apache error_log is:
> "db is not of type GDBM_File at ./addgdbm.pl line 10"

Sounds as if you may have a different perl binary (or something) on the
server as you do when you test your code on the command line. But maybe
it's a permissions problem.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Fri, 01 Oct 1999 10:42:23 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: GDBM and PERL
Message-Id: <37F4F27E.628C6C62@synopsys.com>

Hi Michael,

gammo@my-deja.com wrote:

> Q1:  What is a gdbm file?  Is it just a plain Ascii text file?

A GDBM file is a type of DBM file.  A DBM file is a way to flexibly
store and access data on a disk by using a hash structure (key-value
mapping).  A GDBM file is the DBM implementation by the GNU
organization.

You can use GDBM files much like hash tables in perl.  Here's a quick
example.

#!/usr/local/bin/perl-5.004 -wT
# Always use -w to catch errors.  -T should be used for CGIs.

# dbm.pl
# Author: Dav Amann (dove@synopsys.com)
# Version: 1.0
#
# Usage: dbm.pl to enter in a new email address and date to send.
#        dbm.pl -p to print out all email addresses and dates to send.

use strict;                      # Always use strict.
use GDBM_File;                   # Need this module to handle GDBM Files

use Getopt::Std;                 # For options handling
my $gdbm_file = "email";

# Main
my %option = ();

getopts("p", \%option);

if ($option{p}) {
    print_database();
} else {
    enter_to_database();
}


sub enter_to_database {

    # Prompt for Email Address

    print "Enter email address to GDBM file: ";
    my $email = <STDIN>;
    chop $email;

    # Prompt for the Date

    print "Enter the date to send to GDBM file: ";
    my $date_to_send = <STDIN>;
    chop $date_to_send;

    # Open DBM file

    my %EMAILS;

    tie %EMAILS, "GDBM_File", $gdbm_file, &GDBM_WRCREAT, 0640
        or die "Can't open $gdbm_file: $!\n";

    # Store info to DBM file

    $EMAILS{$email} = $date_to_send;

    # close the DBM file

    untie %EMAILS;

    print "Added to Database\n";

}


sub print_database {

    # Open DBM file

    my %EMAILS;

    tie %EMAILS, "GDBM_File", $gdbm_file, &GDBM_WRCREAT, 0640
        or die "Can't open $gdbm_file: $!\n";

    # print each element of GDBM file

    foreach my $email (sort keys %EMAILS) {
        print "Email: $email  Date to Send: $EMAILS{$email}\n";
    }

    # close the DBM file

    untie %EMAILS;

}



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

Date: 01 Oct 1999 17:45:59 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: GDBM and PERL
Message-Id: <37f4f357$0$200@nntp1.ba.best.com>

gammo@my-deja.com wrote:

> Q1:  What is a gdbm file?  Is it just a plain Ascii text file?

A1: No. It is a simple form of database file that associates keys with
corresponding values.

In a sense, it's like a Perl hash that has been stored to disk so it can
be available to future invocations of the script. And it can grow very
large without using up all your computer's memory, because its
elements are kept on disk, and only loaded into memory one key-value
pair at a time, as needed.

I believe the official documentation for how you access things like
GDBM files (which are just one flavor of DBM files that you can use) in
Perl is found in:

perldoc -f tie

and

perldoc perltie

You may also be able to extract some useful info from:

man gdbm

The second edition of Programming Perl has some good information in
Chapter 7, p. 378 and thereafter, where it talks about AnyDBM_File.
Also, the Perl Cookbook gives an excellent treatment of the whole
subject in Chapter 14, "Database Access".

For someone who is just starting out, the Cookbook coverage is likely
to be the most helpful, I think.

Here are a few minimal examples:

use GDBM_File;

tie %HASH, 'GDBM_File', "/path/to/data/file/hash.gdbm",
	&GDBM_WRCREAT, 0644;

# this will open the GDBM file for reading and writing, and create
# it with permissions 0644 if it doesn't already exist. note: while
# this tie is in effect, no other ties to this GDBM file will be
# allowed.

# now do some stuff with %HASH:

$HASH{'key'}         = 'value';
$HASH{'another key'} = 'another value';

untie %HASH; # now hash.gdbm is available for other tie operations

tie %HASH, 'GDBM_File', "/path/to/data/file/hash.gdbm",
	&GDBM_READER, undef;

# the GDBM file is now opened in read-only mode. note: you can make
# as many read-only ties at a time (say, from other concurrently
# running copies of the same script) as you want.

$walnuts   = $HASH{'key'};         # $walnuts now contains 'value'
$rutabagas = $HASH{'another key'}; # $rutabagas now contains
                                   # 'another value'

untie %HASH;

Hope that helps.

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Fri, 01 Oct 1999 17:34:35 GMT
From: Danh Dang <ddang@jhancock.com>
Subject: Re: Getting the first occurence of a string
Message-Id: <rv9s5bmm3i590@corp.supernews.com>


Tom Kralidis wrote:
> 
> How does one get the first occurence of a string which occurs many times
> in a file?
> 
> eg.  I have a text file with many fields looking like:
> 
> STATIM 101 18 55 33333.2
> STATIM 101 18 55 32457.4
> STATIM 101 18 55 12349.3
> 
> How does one capture the first occurence (ie. STATIM 101 18 55
> 33333.2).  What I have so far only returns the last occurence:
> 
> while(<>)
> {
>   $string = $1 if (/^STATIM(.*)$/);
> }

LOOP: while (<>) {
   if (/^STATIM(.*)$/) {
          $string = $1 ;
          last LOOP;
   }
}


> 
> I'm trying to manipulate numbers associated with the common strings, at
> specific points in the file (eg. the Nth occurence.
> 
> Any ideas?
> 
> Thanks alot
> 
> ..Tom
> -- 
> 
> 
---------------------------------------------------------------------------
--------------
> Tom Kralidis                                  Geo-Spatial Technologist 
> Canada Centre for Remote Sensing              Tel: (613) 947-1828
> 588 Booth Street , Room 241                   Fax: (613) 947-1408
> Ottawa , Ontario K1A 0Y7                     http://www.ccrs.nrcan.gc.ca
> 
---------------------------------------------------------------------------
--------------


------------------  Posted via CNET Help.com  ------------------
                      http://www.help.com/


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

Date: Fri, 01 Oct 1999 17:34:35 GMT
From: Danh Dang <ddang@jhancock.com>
Subject: Re: How do I get this to work?
Message-Id: <rv9s5bfu3i565@corp.supernews.com>

if ($password =~ /^$check$/)

Jordan DeLozier wrote:
> 
> Hello,
> I have a couple of scripts and people have to put in their passwords to
> log in. The password looks something like this:
> 
> if ($password =~ "$check") {
> &dothis;
> }
> 
> if someone has a password of "Login" and they put in "Loginnow" as their
> password, it still thinks it is right. How can I make this script only 
take
> "Login" and not "Loginnow"? Exact Matches, not these type of things.
> 
> Thanks,
> Jordan DeLozier
> 
> 


------------------  Posted via CNET Help.com  ------------------
                      http://www.help.com/


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

Date: Fri, 1 Oct 1999 20:11:51 +0200
From: "Andreas Schulz" <schulz@access.ch>
Subject: Installing modules
Message-Id: <7t2tkf$78i$1@pacifica.access.ch>

I have  a problem installing modules in my private directory. Two are
running well but i have problems to install gd, libgd and chart because i
recieve error messages with nmake. Please tell me if i can copy the files
directly into the directory - but how do the belong?

Thank you

Andreas






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

Date: Fri, 1 Oct 1999 10:06:15 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: maybe...
Message-Id: <7t2pmk$t0j$1@brokaw.wa.com>


eX-HTML wrote in message <7svugd$ks0$1@lobster.vol.net>...
>ASCII?

I'm pretty sure it's either EBCDIC or Unicode...  I could be wrong.

And that Perl question of yours was...?

Lauren




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

Date: Fri, 1 Oct 1999 11:37:04 -0700
From: moseley@best.com (Bill Moseley)
Subject: Not so sticky checkbox in CGI.pm
Message-Id: <MPG.125e9f2d48ff92e29897b1@206.184.139.132>

Tried on CGI.pm 2.46 2.42

Clearly I'm doing something wrong right in front of my nose.

The checkboxes are sticky when $new_msg is commented out and #checkbox 
is uncommented below, but as below, Not Sticky is not sticky when 
assigned to $new_msg first.

What gives?


#!/usr/local/bin/perl5.005 -w
use strict;
use CGI qw/:standard :html3/; 

my $new_msg = 
   checkbox(-name=>'another',-label=>'Not Sticky',-checked=>1);                  

print header(),start_html();
print `perl -v`,'<P>',$CGI::VERSION,'<p>';
print start_form(),

## Swap these with a comment mark ##
$new_msg,
#checkbox(-name=>'another',-label=>'Not Sticky',-checked=>1),


checkbox(-name=>'rebuild_subjects',-label=>'Sticky',-checked=>1) . "\n",
submit(),endform(),end_html();

-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Fri, 01 Oct 1999 17:14:24 GMT
From: sam@samredman.com
Subject: Re: RegEx for html->plain text
Message-Id: <7t2q53$7jr$1@nnrp1.deja.com>


> Abigail
wrote:
> Well, what you want is rather trivial.

Abigail:  I am looking to do the same thing that the originator of this
thread is seeking.  I posted a link to something someone wrote who also
had the same objective.  He claims that it is crude.  Do you know a way
to accomplish this more elegantly?


http://starship.python.net/crew/tibs/python/html2text


Sam


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 01 Oct 1999 17:19:18 GMT
From: sam@samredman.com
Subject: Re: RegEx for html->plain text
Message-Id: <7t2qe8$7uv$1@nnrp1.deja.com>

Jonathan wrote:
>
> Have you read what it says in perlfaq9 on this very subject ?
>
Can you tell me the html for this perlfaq9? I went to python.org and
looked the faqs and they end with the 8 series.

Thanks,

Sam


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 1 Oct 1999 12:48:19 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: RegEx for html->plain text
Message-Id: <slrn7v9tf0.1dd.abigail@alexandra.delanet.com>

sam@samredman.com (sam@samredman.com) wrote on MMCCXXII September
MCMXCIII in <URL:news:7t2qe8$7uv$1@nnrp1.deja.com>:
{} Jonathan wrote:
{} >
{} > Have you read what it says in perlfaq9 on this very subject ?
{} >
{} Can you tell me the html for this perlfaq9? I went to python.org and
{} looked the faqs and they end with the 8 series.


Perhaps you should go to www.devilbunnies.org, they have 14 faqs.



Abigail
-- 
python.org?? *boggle*


  -----------== 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: 1 Oct 1999 12:55:57 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: RegEx for html->plain text
Message-Id: <slrn7v9tta.1dd.abigail@alexandra.delanet.com>

Sushant Gargya (sushant@ntwrks.com) wrote on MMCCXXII September MCMXCIII
in <URL:news:37F4CE78.D9116891@ntwrks.com>:
** I understand that the problem is trivial and that is why I was only looking f
** regular expression that

I don't understand. If you know the problem is trivial, why do you attempt
to use a solution that would be quite hard, and which need regex features
introduced in 5.005?

** would stree out "<kdjfkdfjkdjf>" (html tags). I have attempted to do that but

HTML tags are a tad more complicated than just that.

** been unsuccessful.
** Here's one of the things I tried:
**         $_ =~ s/\<?+\>//g;
** This doesn't work.

No. That kind of shows you've no idea what you are doing. The above doesn't
even compile. I would suggest learning Perl first before attempting to do
anything. And while you are learning Perl, take some time to read the FAQ.

And don't post Jeopardy style.



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== 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: 1 Oct 1999 12:57:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: RegEx for html->plain text
Message-Id: <slrn7v9u0j.1dd.abigail@alexandra.delanet.com>

sam@samredman.com (sam@samredman.com) wrote on MMCCXXII September
MCMXCIII in <URL:news:7t2q53$7jr$1@nnrp1.deja.com>:
;; 
;; > Abigail
;; wrote:
;; > Well, what you want is rather trivial.
;; 
;; Abigail:  I am looking to do the same thing that the originator of this
;; thread is seeking.  I posted a link to something someone wrote who also
;; had the same objective.  He claims that it is crude.  Do you know a way
;; to accomplish this more elegantly?


Read the FAQ. Read this group for, oh, 10 hours or so, because that seems
to be the frequency in which this question is posted.

A simple, correct, solution has been posted in this thread already.



Abigail
-- 
sub A::TIESCALAR{bless\my$x=>A};package B;@q=qw/Hacker Another
Perl Just/;use overload'""'=>sub{pop @q};sub A::FETCH{bless\my
$y=>B}; tie my $shoe => 'A';print "$shoe $shoe $shoe $shoe\n";


  -----------== 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: Fri, 01 Oct 1999 13:00:39 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: RegEx for html->plain text
Message-Id: <37F4F6C7.44895A7C@texas.net>

sam@samredman.com wrote:
> 
> Jonathan wrote:
> >
> > Have you read what it says in perlfaq9 on this very subject ?
> >
> Can you tell me the html for this perlfaq9? I went to python.org and
> looked the faqs and they end with the 8 series.
> 
> Thanks,
> 
> Sam

Are you a troll, or just stupid?

- Tom


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

Date: Fri, 01 Oct 1999 14:30:38 -0400
From: "Robert W. Byrd" <tech@tburg.net>
Subject: Re: RegEx for html->plain text
Message-Id: <37F4FDCE.907911D3@tburg.net>

sam@samredman.com wrote:

> 
> Jonathan wrote:
> >
> > Have you read what it says in perlfaq9 on this very subject ?
> >
> Can you tell me the html for this perlfaq9? I went to python.org and
> looked the faqs and they end with the 8 series.
> 
> Thanks,
> 
> Sam

type :  perldoc perlfaq9

Works fine on my system :)

 .rob.

-- 
Robert W. Byrd | Completely Computer Friendly
tech@tburg.net | 67-B Oxford St., Tillsonburg, ON CA N4G 2G3
------------------------------------------------------------
Nothing clever here          }|{         ereh revelc gnihtoN


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

Date: Fri, 01 Oct 1999 17:10:16 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: Runtime exception driving me crazy
Message-Id: <YV5J3.665$QE1.41029@newshog.newsread.com>

David Stiff (dstiff@symantec.com) wrote:
> After doing some more testing and debugging I have determined that this is
> not code related. I can comment out any code and it will still continue to
> give me the Runtime Exception error.

What, specifically, is giving you an exception? Is this a Perl error,
or an OS error? I don't think I could get Perl to do this if I tried. 

It sounds like there's a problem in your system's bowels, but without
more info I can't really tell. Have you tried reinstalling Perl to stave
off DLL rot?

Scott

http://autoperl.skwc.com Automating Windows With Perl


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

Date: Fri, 01 Oct 1999 13:01:17 -0400
From: Brett Keenan <brett.keenan@compaq.com>
Subject: system function and it's output
Message-Id: <37F4E8DD.A69601B4@compaq.com>

I have this line of code:

$status=system("$run_segue >& test.log")/256;


where I want to execute this run_segue.sh script and put its outputs
into test.log, however, when I run this piece of code, all of
run_segue.sh's data  is printed out on the screen instead of being
dumped into the test.log file.  When I execute the command outside of
the PERL script at the Unix prompt, it works fine.  Does anyone have
suggestions on how I might get this to work or anyone know of good
places to read about how PERL's output buffers are written to?  Thanks
Brett



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

Date: 1 Oct 1999 17:36:10 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Understanding exec()
Message-Id: <7t2rea$nu2$1@news.NERO.NET>

In article <MPG.125e4b69194fc8849897a9@206.184.139.132>,
Bill Moseley <moseley@best.com> wrote:
>John Stanley (stanley@skyking.OCE.ORST.EDU) seems to say...
>> You should read the documentation for your
>> external program to find out what it expects and give it what it
>> wants.
>
>Normally, yes.  Lets see.  Oh, here's the relevant part of the docs now:
>
>"You don't need to put quotes around search words, however it is highly
>recomanded that you do so if you are using [program] in a perl script 
>since command lines passed through a command of the type:
>open([program],"|$commandLine"); can create unexpected returns or loops 
>if no quotes are used. "

I said YOU should read the documentation for the program you are using
and find out what it expects, not read the documentation to me.
What you quoted is not relevant, it does not say anything about what it
expects as input. 

You aren't using a command of the type "open...", you are using an
exec. I've already quoted the relevant part of the docs to you, now
I suggest you go read the whole thing and if you have a specific
question about a specific part of the documentation on exec, ask it.

>"unexpected returns" and "loops"?  How about "unexpected deleted files 
>on your file system", and "system break-ins"? 

What perl specific question are you asking?



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

Date: Fri, 1 Oct 1999 11:26:33 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Understanding exec()
Message-Id: <MPG.125e9cb54508eb889897b0@206.184.139.132>

John Stanley (stanley@skyking.OCE.ORST.EDU) seems to say...
> >"You don't need to put quotes around search words, however it is highly
> >recomanded that you do so if you are using [program] in a perl script 
> >since command lines passed through a command of the type:
> >open([program],"|$commandLine"); can create unexpected returns or loops 
> >if no quotes are used. "
> 
> I said YOU should read the documentation for the program you are using
> and find out what it expects, not read the documentation to me.
> What you quoted is not relevant, it does not say anything about what it
> expects as input. 

Jeeze, no sense of humor.  I was pointing out that 1) that IS the 
documentation, and 2) the kind documentation available for this program 
and how bad it is and how they are worrying about "unexpected returns" 
and "loops" instead of the real security hole they were telling people 
to create.

Sorry, I guess I need to be more explicit when I say "I'M JOKING" in all 
caps in my posts.


-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Fri, 1 Oct 1999 11:15:30 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: using tr?
Message-Id: <Pine.GSO.4.10.9910011113150.19155-100000@user2.teleport.com>

On Thu, 30 Sep 1999, MeTAlMollY <sorry@geen.nl> wrote:

> $name =~ tr/A-Z/a-z/; # this lowercase everything

No, that affects only letters A through Z in ASCII. Characters with
umlauts, for example, won't be affected. Don't you have those in .nl land?

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 1 Oct 1999 13:15:19 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Validating email addresses.
Message-Id: <slrn7v9v1k.1dd.abigail@alexandra.delanet.com>

Samuel Kilchenmann (skilchen@swissonline.ch) wrote on MMCCXXII September
MCMXCIII in <URL:news:Pd3J3.20829$m4.79649806@news.magma.ca>:
%% Abigail <abigail@delanet.com> wrote in:
%% news:slrn7v8ual.8i.abigail@alexandra.delanet.com...
%% >
%% > We've had this question many times in this newgroups, with all
%% > sorts of attempts to do it all in a wacky regex.
%% >
%% > But why use a regex if there's this wonderful Parse::RecDescent
%% > module of Damian Conway?  Here's a module using Parse::RecDescent
%% > to check the syntax of email addresses.
%% >
%% > Have fun.
%% >
%% Thanks a lot! Here are some results of my experiments:
%% 
%% I don't know if i have an installation or a Perl version problem but
%% addresses following the rule:
%%   mailbox = phrase route-addr
%% are not considered valid on my system.
%% 
%% use RFC::822::Address qw /valid/;
%% print "Valid 4\n" if valid ('Abigail <abigail@delanet.com>');
%% print "Valid 5\n" if valid ('Abigail <@a,@b,@c:abigail@delanet.com>');
%% print "Valid 6\n" if valid ('"this is a phrase" <abigail@delanet.com>');

They are indeed unvalid addresses. It's the space between the phrase
and the route-addr that's killing you. The grammar in RFC 822 does not
allow that. Bummer, ain't?

   use RFC::822::Address qw /valid/;
   print "Valid 4\n" if valid ('Abigail<abigail@delanet.com>');
   print "Valid 5\n" if valid ('Abigail<@a,@b,@c:abigail@delanet.com>');
   print "Valid 6\n" if valid ('"this is a phrase"<abigail@delanet.com>');
   print "Valid 7\n" if valid ('"Abigail "<abigail@delanet.com>');
   __END__
   Valid 4
   Valid 5
   Valid 6
   Valid 7



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: Fri, 01 Oct 1999 16:58:57 GMT
From: eric_poulsen@my-deja.com
Subject: Re: Win32::API -- how to call functions using NULL pointers?
Message-Id: <7t2p89$710$1@nnrp1.deja.com>

Bill,

Actually Aldo told me the same thing.  I had thought of this, but it
occured to me: wouldn't that just be a "pointer" to the value 0?  If you
ACTUALLY wanted a pointer to the value 0 (long), would you do this? :

$pointer_to_zero = pack ("L",0);

While an actually NULL pointer would be:

$null_pointer = 0;

I guess I'm getting a bit confused because C/C++ is rather strongly
typed, and Perl is not.

In ANY case, I modified my code -- I now get a different error.  Instead
of error 632 ("should not occur under normal operation"), I received an
error 87, which is not in the documentation.

I'm sure this would be much easier if I had learned C/C++ as it relates
to using DLLs and Windows data structures, but I learned in back in the
old DOS pre-windows days.  *sigh*


In article <19990929090323.01353.00000041@ng-bg1.aol.com>,
  bbirthisel@aol.com (Bbirthisel) wrote:
> Hi Eric:
>
> >Unfortunately, the documentation for the Win32::API doesn't specify
how
> >to send a NULL pointer.  I've tried using "pointers" (scalars) that
are
> >undefined, or set to 0.  Of course, if they're set to 0, then it's
just
> >a pointer to that number.
>
> How did you do it? In Win32API::CommPort, I put:
>
> my $null =0;
>
> >Does anyone know how I'd specify a NULL pointer using the module?
I've
> >included the complete test script I'm using below.  My perl is
Gurusamy
> >version 5.004.
>
>
>$RasDial->Call(undef,undef,$RASDIALPARAMS,$DWNOTIFIERTYPE,undef,undef);
>
>
$RasDial->Call($null,$null,$RESDIALPARAMS,$DWNOTIFIERTYPE,$null,$null);
>
> I use similar calls on both 5.004 and 5.005. I did not check your
> declaration in the API docs.
>
> -bill
> Making computers work in Manufacturing for over 25 years (inquiries
welcome)
>


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 965
*************************************


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