[13936] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1346 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 11 03:05:42 1999

Date: Thu, 11 Nov 1999 00:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942307510-v9-i1346@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 11 Nov 1999     Volume: 9 Number: 1346

Today's topics:
         Is it true earning while browsing? <haiyingliang1@home.com>
        communicating with another process <dm@cs.duke.edu>
    Re: file read/write conflicts? (Tad McClellan)
        how to query the hostname? <maistro@swi.hu>
    Re: Image type conversion??? <ronnie@catlover.com>
    Re: Image type conversion??? <rootbeer@redcat.com>
        IO-Tty binary package for W95? (Neil Cherry)
    Re: MD5 Encryption (Martin Vorlaender)
    Re: modifying an series of RCS files <vincent.murphy@cybertrust.gte.com>
    Re: Module File:Find problem <zeng@stat.Berkeley.EDU>
        my ... if -- strange behavior <johnlin@chttl.com.tw>
        Need ODBC Driver for Rdb 6.0 <eugen@svzserv.kemerovo.su>
        new line break??? <yyoon99@worldnet.att.net>
    Re: new line break??? <lr@hpl.hp.com>
    Re: new line break??? <seshadri9@worldnet.att.net>
    Re: new line break??? <bwalton@rochester.rr.com>
    Re: new line break??? (Rob Manchester)
    Re: new line break??? (Rob Manchester)
    Re: new line break??? <lr@hpl.hp.com>
        Newbie Question - Please help <kreator@pangeatech.com>
    Re: perl & permission (Abigail)
    Re: PERLHUMOR: self-printing resume (Abigail)
    Re: PERLHUMOR: self-printing resume (Ilya Zakharevich)
    Re: Problem with Net::LDAP Package <rootbeer@redcat.com>
    Re: regular expression to parse html out <rootbeer@redcat.com>
    Re: regular expression to parse html out (Tad McClellan)
    Re: regular expression to parse html out <seshadri9@worldnet.att.net>
        using perl scripts to paste ads on remote servers fundman@yahoo.com
    Re: W95 & gethostbyname questions (Neil Cherry)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 11 Nov 1999 05:37:36 GMT
From:     Mark leung <haiyingliang1@home.com>
Subject:  Is it true earning while browsing?
Message-Id: <942298653.930455@news1.lynx.bc.ca>

The answer is right here.

http://go.to/newsdigest



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

Date: 11 Nov 1999 02:10:03 -0500
From: Dan Mills <dm@cs.duke.edu>
Subject: communicating with another process
Message-Id: <87ogd1fqr8.fsf@majikthise.adsl.duke.edu>

Hello,

I need to communicate with another process in the simplest way
possible.  It needs to be interactive, sending/receiving a few chars
at a time.  What is the best way to do this?  Named pipes?

Any help would be appreciated!

Thanks,
-Dan


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

Date: Wed, 10 Nov 1999 19:49:18 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: file read/write conflicts?
Message-Id: <slrn82k4ke.t2a.tadmc@magna.metronet.com>

On Wed, 10 Nov 1999 18:10:02 -0600, Ben Valentine <vbenjam@provalue.net> wrote:

>Does anyone know how perl or web servers in general 


   Errrr, Perl and web servers are not related.


> handle an attempt by two
>different invocations of the same perl script to read and write to the same
>text file at the same time?


   This is a problem in all multi-tasking environments.

   The client/server model of the WWW is multi-tasking.


   You need to do "file locking".

      perldoc -q '\block'

   Finds 3 Frequently Asked Questions that mention file locking.



      perldoc -f flock

   Describes the perl function that you can use to implement
   file locking.

   Note that file locking is *merely advisory* (this means that
   every single program that writes to the file must cooperate by
   not writing until after it has acquired a lock).


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Tue, 9 Nov 1999 14:50:33 +0100
From: "Oreg Dixie" <maistro@swi.hu>
Subject: how to query the hostname?
Message-Id: <809g84$5ud$1@pollux.matav.net>

Hi!

I need your help. I'm making a forum and I'd like to store (statistics) the
people's host
or dial-up address and the type of browser they are using. How Can I do
this?

Thanks in advance,

Flatline






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

Date: Thu, 11 Nov 1999 02:06:48 GMT
From: Ron Grabowski <ronnie@catlover.com>
Subject: Re: Image type conversion???
Message-Id: <382A2610.F3F27F05@catlover.com>

Image-Magick and its Perl counterpart PerlMagick will do just this

Search CPAN or if you have activestate

ppm install Image-Magick


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

Date: Wed, 10 Nov 1999 19:38:38 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Image type conversion???
Message-Id: <Pine.GSO.4.10.9911101937270.15797-100000@user2.teleport.com>

On Wed, 10 Nov 1999, Darrell wrote:

> I noticed a module that uses ImageMagick to perform the conversion,
> but I don't have ImageMagick.

You probably wouldn't regret getting ImageMagick. Cheers!

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



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

Date: Thu, 11 Nov 1999 06:29:11 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: IO-Tty binary package for W95?
Message-Id: <slrn82kofm.nkt.njc@dmc.uucp>

Does anyone have a binary package (or a ppd) for the module IO-Tty?
I'm trying to get Expect.pm to work and it complains about pty's. Am I
looking for the right stuff?

-- 
Linux Home Automation           Neil Cherry             ncherry@home.net
http://members.home.net/ncherry                         (Text only)
http://meltingpot.fortunecity.com/lightsey/52           (Graphics GB)



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

Date: Thu, 11 Nov 1999 06:29:15 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: MD5 Encryption
Message-Id: <382a542b.524144494f47414741@radiogaga.harz.de>

Tuxedo Loopy (jjyooi@yahoo.com) wrote:
: kragen@dnaco.net (Kragen Sitaker) wrote:
: > This is a two-pass solution:
: > 1. install Linux.
: > 2. use crypt().
:
: OK. Short of doing that, is there any other possible solution?

As I've missed the beginning of this thread, I may be totally off.

If you're looking for a solution to get crypt()ed passwords on a
non-crypt version of NT perl, check out Crypt::UnixCrypt on CPAN
(www.perl.com/CPAN). This is a perl-only version of the function.

cu,
  Martin
--
                       |  Martin Vorlaender  |  VMS & WNT programmer
  OpenVMS: When you    |  work: mv@pdv-systeme.de
  KNOW where you want  |        http://www.pdv-systeme.de/users/martinv/
  to go today.         |  home: martin@radiogaga.harz.de


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

Date: Thu, 11 Nov 1999 02:05:54 GMT
From: Vincent Murphy <vincent.murphy@cybertrust.gte.com>
Subject: Re: modifying an series of RCS files
Message-Id: <xjg4setrddq.fsf@gamora.ndhm.gtegsc.com>

>>>>> "Navin" == Navin Chander <navin@ti.com> writes:

    Navin> I have a series of files in RCS. I have to do the 
    Navin> same modification to each file.  I am trying to do
    Navin> it using perl. but the problem is, when I check the
    Navin> file back in,

    Navin> RCS requires an input. Can someone tell me how to
    Navin> do that in perl.

You probably want to use the Rcs.pm. 


Something like this works for one file (from perldoc Rcs):

    use Rcs;
    $obj = Rcs->new;


Set information regarding RCS object.

    $obj->file('myfile.pl');


Check in file using -u switch. This will check in the file, and will then check out the file in an unlocked state. The -m switch is used to set the revision comment. 

    $obj->ci('-u', '-mRevision Comment');


    Navin> thanks

HTH.



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

Date: Wed, 10 Nov 1999 18:55:42 -0800
From: Bin Zeng <zeng@stat.Berkeley.EDU>
Subject: Re: Module File:Find problem
Message-Id: <Pine.SOL.4.10.9911101853200.14061-100000@saruman.Berkeley.EDU>

> Umm, if you read the docs for File::Find you will see a specific
> note about symlinks.  It says:
> 
>   "There is no way to make find or finddepth follow symlinks."
> 
> If you think about how symlinks can be set up, you'll see that
> this is considered to be A Good Thing by some.
> 
> If you need to follow symlinks, you'll need to push them
> onto a stack and then follow them using your own code.

I think I get the point why the File::Find doesn't follow the
symlinks. But would you elaborate about 'push them onto a stack'?





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

Date: Thu, 11 Nov 1999 15:02:52 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: my ... if -- strange behavior
Message-Id: <80dpmt$gop@netnews.hinet.net>

Here is the code

package A;
use strict;

sub new {
    my($class,$input)=@_;
    my $result="A::$input" if defined $input;
    bless \$result;
}

sub str {
    my($self)=@_;
    if(defined $$self) { return $$self } else { return "===" }
}

package main;

my $a=A->new("a");
my $b=A->new(undef);
print $a->str,"\n";
print $b->str,"\n";

-------------------------- run it
A::a
===
-------------------------- seems good, but in another test

package main;

my $a=A->new("a");
my $b=A->new(undef);
my $c=A->new("c");
print $a->str,"\n";
print $b->str,"\n";
print $c->str,"\n";

-------------------------- run it
A::a
A::c            <-- Should be "===".  Hey, where is this from?
A::c
--------------------------

This can be corrected by changing the line

my $result="A::$input" if defined $input;

into

my $result;
$result="A::$input" if defined $input;

So I think this version of Perl has some error
in "my" initialization with "if".

-------------------------- perl -v

This is perl, version 5.005_03 built for MSWin32-x86-object
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-1999, Larry Wall

Binary build 518 provided by ActiveState Tool Corp.
http://www.ActiveState.com
Built 13:14:00 Jun 24 1999






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

Date: Thu, 11 Nov 1999 11:26:36 +0800
From: Eugene Grosbein <eugen@svzserv.kemerovo.su>
Subject: Need ODBC Driver for Rdb 6.0
Message-Id: <382A376C.E9634E77@svzserv.kemerovo.su>

Hi!

I need access from Perl program to Rdb using TCP/IP.
The only way I found is to use DBD::ODBC.
It seems that I need a driver for Rdb. 
I tried OpenLink Request Broker for FreeBSD.
There is no Rdb in its list of supported databases.

Is there an UNIX (BSD or Linux) implementation of 
ODBC Driver for Rdb 6.0? 

Please answer via e-mail too.

Thank you.

Eugene Grosbein.


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

Date: Wed, 10 Nov 1999 21:20:57 -0500
From: "YoungJoon Yoon" <yyoon99@worldnet.att.net>
Subject: new line break???
Message-Id: <80d95s$58q$1@bgtnsc03.worldnet.att.net>

I just hava a simple and stupid question.
When I save a text file in Windows and open it from Unix box, I see "^M" in
the end of each line. So, would you tell me why this happens and how to get
rid of this by coding perl? I am sure there might be very simple way to do
it, but don't know how. I tried to do it by regular exp., but it doen't
work.

- Thanks




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

Date: Wed, 10 Nov 1999 20:07:07 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: new line break???
Message-Id: <MPG.1293e0be361dba2a98a1d6@nntp.hpl.hp.com>

In article <80d95s$58q$1@bgtnsc03.worldnet.att.net> on Wed, 10 Nov 1999 
21:20:57 -0500, YoungJoon Yoon <yyoon99@worldnet.att.net> says...
> I just hava a simple and stupid question.

That is debatable.  Simple, perhaps.  Stupid, no.  And it isn't in the 
FAQ (though perhaps it should be, as it is indeed Frequently Asked :-).

> When I save a text file in Windows and open it from Unix box, I see "^M" in
> the end of each line. So, would you tell me why this happens and how to get
> rid of this by coding perl? I am sure there might be very simple way to do
> it, but don't know how. I tried to do it by regular exp., but it doen't
> work.

It happens because the end-of-line representation for an external file 
in Windows/DOS is "\r\n", which is the same as "\cM\cJ".  On Unix, it is 
simply "\n" or "\cJ".  The internal representation in either case is 
just the single character "\n".

for (<IN>) {
    s/\cM$//;
    print OUT;
}

Or, assuming you got the file from Windows to Unix using telnet, 
transfer the file using 'ascii' mode.

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


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

Date: Wed, 10 Nov 1999 23:51:56 -0800
From: Seshadri Sriperumbudur <seshadri9@worldnet.att.net>
Subject: Re: new line break???
Message-Id: <382A759C.23D67E97@worldnet.att.net>

Files with "^M" never caused me any trouble and I used the file in scripts as I
would use the same file without the "^M"s comfortably. I'm not a perl guru but
try this:

while (<FILE>) {
    $_ =~ s/.*[^]M//g;
    print OUT $_;
}
Of course you should have filehandles FILE and OUT "open"ed be4 u try this.

- Sesh


YoungJoon Yoon wrote:

> I just hava a simple and stupid question.
> When I save a text file in Windows and open it from Unix box, I see "^M" in
> the end of each line. So, would you tell me why this happens and how to get
> rid of this by coding perl? I am sure there might be very simple way to do
> it, but don't know how. I tried to do it by regular exp., but it doen't
> work.
>
> - Thanks



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

Date: Thu, 11 Nov 1999 00:12:26 -0500
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: new line break???
Message-Id: <382A5039.EA5FAAE7@rochester.rr.com>

YoungJoon Yoon wrote:
> 
> I just hava a simple and stupid question.
> When I save a text file in Windows and open it from Unix box, I see "^M" in
> the end of each line. So, would you tell me why this happens and how to get
> rid of this by coding perl? I am sure there might be very simple way to do
 ...
Try the following one-liner on your Unix box [untested, I don't have
a Unix box handy]:

     perl -wne 's/\r//g;print'

as a filter for your Win32 ASCII files.

This problem occurs because in ASCII files on Windoze, a newline
sequence is \015\012, while in Unix, it is \012.  \015 is commonly
rendered as ^M .  Another fix is to use ftp to transfer your files,
specifying to ftp that the files are ASCII.  ftp should fix them 
for you.
-- 
Bob Walton


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

Date: 11 Nov 1999 05:55:39 GMT
From: chesta@brown.edu (Rob Manchester)
Subject: Re: new line break???
Message-Id: <slrn82kmhp.mav.chesta@lester.manchero.org>

In article <382A5039.EA5FAAE7@rochester.rr.com>, Bob Walton wrote:
:YoungJoon Yoon wrote:
:> 
:> I just hava a simple and stupid question.
:> When I save a text file in Windows and open it from Unix box, I see "^M" in
:> the end of each line. So, would you tell me why this happens and how to get
:> rid of this by coding perl? I am sure there might be very simple way to do
:...
:Try the following one-liner on your Unix box [untested, I don't have
:a Unix box handy]:
:
:     perl -wne 's/\r//g;print'
:
:as a filter for your Win32 ASCII files.

using perl is sort of overkill for this, even sed would be overkill,
on some unix machines there is actualy a dos2unix (and unix2dos) binary,
or one could just do
roberto@lester> tr -s '\r\n' '\n' <dos.file>unix.file
or even
roberto@lester> tr -d '\r' <dos.file>unix.file
but that might delete any intentional  and not just at the end of 
the file.

-rob


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

Date: 11 Nov 1999 05:59:27 GMT
From: chesta@brown.edu (Rob Manchester)
Subject: Re: new line break???
Message-Id: <slrn82kmot.mav.chesta@lester.manchero.org>

:using perl is sort of overkill for this, even sed would be overkill,
:on some unix machines there is actualy a dos2unix (and unix2dos) binary,
:or one could just do
:roberto@lester> tr -s '\r\n' '\n' <dos.file>unix.file
:or even
:roberto@lester> tr -d '\r' <dos.file>unix.file
:but that might delete any intentional  and not just at the end of 
:the file.
     ^^^^ should read "line"
-rob


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

Date: Wed, 10 Nov 1999 23:07:07 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: new line break???
Message-Id: <MPG.12940af9404ebb1898a1d7@nntp.hpl.hp.com>

In article <382A759C.23D67E97@worldnet.att.net> on Wed, 10 Nov 1999 
23:51:56 -0800, Seshadri Sriperumbudur <seshadri9@worldnet.att.net> 
says...
> Files with "^M" never caused me any trouble and I used the file in scripts as I
> would use the same file without the "^M"s comfortably.

I too have had no difficulty running DOS-formatted Perl files on Unix.  
But that is because I always use the '-w' flag.  If there are no flags 
on the hashbang line, the shell doesn't launch the perl process 
properly.  So in general the carriage-return characters should be 
stripped.

>           I'm not a perl guru but try this:
> 
> while (<FILE>) {
>     $_ =~ s/.*[^]M//g;
>     print OUT $_;
> }

Your regex is irrelevant, because the string '^M' has nothing to do with 
the control character "\cM".  Even if you meant "\cM", would you want to 
wipe out all characters ahead of it?  And how can it match more than 
once on a line?

> Of course you should have filehandles FILE and OUT "open"ed be4 u try this.

Well, *that*'s true, no matter how k3wl you think your spelling is, 
d00d!

> YoungJoon Yoon wrote:

<SNIP> of out-of-place quotation of the roiginal post.
 

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


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

Date: Thu, 11 Nov 1999 00:17:52 -0700
From: "KREATOR" <kreator@pangeatech.com>
Subject: Newbie Question - Please help
Message-Id: <s2kra0pmhsq59@corp.supernews.com>

I am using ActivePerl on a Win NT 4 Server.  I have associated .cgi with
perl.exe (just like it was for .pl) in IIS.

I am tring to convert a existing site from a Linix/UNIX server to it.  I am
getting the follow error when the pages try to execute CGI scripts.

Failed to execute script 'username.cgi': Win32 Error Code = 87

Can anyone tell me what this might mean, or where I can find a listing of
the error codes.  The ActivePerl Docs do not seem to have this.  Maybe I'm
Blind.

I am very green, obviously.

BTW, UNIX to NT not my call.  Site does not have a LINUX/UNIX Server.

Ryan - kreator@pangeatech.com






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

Date: 10 Nov 1999 23:08:36 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: perl & permission
Message-Id: <slrn82kk1c.lmh.abigail@alexandra.delanet.com>

Larry Rosler (lr@hpl.hp.com) wrote on MMCCLXII September MCMXCIII in
<URL:news:MPG.1293a1e56187c78598a1d2@nntp.hpl.hp.com>:
"" In article <3829F59A.69855D2D@mail.cor.epa.gov> on Wed, 10 Nov 1999 
"" 14:45:46 -0800, David Cassell <cassell@mail.cor.epa.gov> says...
"" ... 
"" > Shlomit Afgin wrote:
"" ...
"" > > my script contain:
"" > > if ((-e $files[$i]) &&
"" > >   (((-f $files[$i])&&(! -r $files[$i]))||((-d $files[$i])&&( !-x
"" > > $files[$i])))){
"" > >    print BAD "$files[$i]\n";
"" > >    }
"" > 
"" > Ugh.  All those parens make my eyes hurt.  Check out the
"" > precedence of the -X functions vs. && [or 'and'] and you
"" > can make this easier to read.
"" 
"" You might also consider that doing successive stats on the same file is 
"" costly.  The magic identifier _ obviates this.
"" 
""   if (-e $files[$i] && (-f _ && ! -r _ || -d _ && ! -x _)) {
""      print BAD "$files[$i]\n";
""   }


    #!/opt/perl/bin/perl -w


    use strict;
    use Benchmark;


    $::f = "/etc/password";


    timethese 1_000_000 => {
        plain      => '-e $::f; -f $::f; -r $::f; -d $::f; -x $::f',
        underscore => '-e $::f; -f _;    -r _;    -d _;    -x _',
    }

    __END__
         plain: 28 wallclock secs ( 9.67 usr + 15.99 sys = 25.66 CPU)
    underscore:  9 wallclock secs ( 4.07 usr +  3.99 sys =  8.06 CPU)


Hmmm, that's less than 4.5 microseconds per stat on average.

Not really something to worry about. 




Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\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: 10 Nov 1999 22:48:17 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: PERLHUMOR: self-printing resume
Message-Id: <slrn82kir9.lmh.abigail@alexandra.delanet.com>

Ala Qumsieh (aqumsieh@matrox.com) wrote on MMCCLXIII September MCMXCIII
in <URL:news:x3y9045zxuv.fsf@tigre.matrox.com>:
{} 
{} Mike Coffin <mhc@Eng.Sun.COM> writes:
{} 
{} > abigail@delanet.com (Abigail) writes:
{} > 
{} > > Well, it's documented at the most obvious place: perldoc -f sort.
{} > 
{} > "Hmmmm..  I wonder if $a or $b are somehow special in Perl.  Let's
{} > see: the index of the Camel book doesn't have anything relevant under
{} > 'a', 'b', '$a', or '$b'.  And neither 'perldoc \$a' nor 'perldoc \$b'
{} > return anything....
{} > 
{} > "However, just to be sure, I'll type 'perldoc -f sort'; maybe 
{} > $a and $b are documented there."
{} 
{} Obvious, eh?

Well, yeah. Bloody damn obvious. After all, the original asker of
the question already know how and why - he just couldn't find it in
the manual.

Given that you know why $a and $b are special, 'sort' *is* the obvious
place to look.


What's the point of quoting if people can't be bothered to read the context?



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\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: 11 Nov 1999 05:15:04 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: PERLHUMOR: self-printing resume
Message-Id: <80djco$o95$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Mike Coffin 
<mhc@Eng.Sun.COM>],
who wrote in article <8p6emdyqj9y.fsf@Eng.Sun.COM>:
> "Hmmmm..  I wonder if $a or $b are somehow special in Perl.  Let's
> see: the index of the Camel book doesn't have anything relevant under
> 'a', 'b', '$a', or '$b'.  And neither 'perldoc \$a' nor 'perldoc \$b'
> return anything....
> 
> "However, just to be sure, I'll type 'perldoc -f sort'; maybe 
> $a and $b are documented there."

Just for the fun of it, I tested how IBM online book tackles this.  Doing

  view perl $a
  view perl $b

(DOSISH shell) brought me to $^A and $^T pages.  Understandable, but
not helpful...

Ilya


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

Date: Wed, 10 Nov 1999 19:22:58 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Problem with Net::LDAP Package
Message-Id: <Pine.GSO.4.10.9911101922370.15797-100000@user2.teleport.com>

On Wed, 10 Nov 1999, Gerald Maheo wrote:

> I have the message : Can't locate object method "new" via package

Have you seen what perldiag says about that message? Cheers!

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



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

Date: Wed, 10 Nov 1999 19:34:35 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: regular expression to parse html out
Message-Id: <Pine.GSO.4.10.9911101933440.15797-100000@user2.teleport.com>

On Thu, 11 Nov 1999, vod wrote:

> Subject: regular expression to parse html out

You can't parse HTML with simple regular expressions. Use HTML::Parser
from CPAN.

And please read the FAQ before you post again. Thank you.

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



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

Date: Wed, 10 Nov 1999 17:33:56 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: regular expression to parse html out
Message-Id: <slrn82jsmk.so1.tadmc@magna.metronet.com>

On Thu, 11 Nov 1999 00:35:54 +0530, vod <removethis_vod@writemail.com> wrote:

>I want the script to search
>thru the .htm* pages but only the text that is outside the html tags,
>i.e. that is outside <  > tags.

>Basically i think the reg ex has to look for any word starting
>with "<" followed by anything and ending with ">".


   That won't do it.

   e.g.:

      <!--   don't put any <font> tags in the <smoozle> element -->
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      <img src="foo.jpg" alt=">>kewl picture!<<">
      ^^^^^^^^^^^^^^^^^^^^^^^^^
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

   Your specification above allows all 3 of those matches for
   each example.

   You need to tighten your spec up some...


>I am not very good at reg exes 


   That's OK, because you cannot use regexes to do what you
   want to do. It is impossible. Give up. Find another way.
   Regexs aren't it.


> so i was hoping to find a
                  ^^^^^^^

   And where did you look?

   Did you even try something as basic as typing the command below,
   which finds 4 Frequently Asked Questions that mention HTML,
   before sending your message to *tens of thousands* of computers
   around the world where *thousands* of people can waste their
   time reading your question that has already been answered.


      perldoc -q HTML 


>a reg exes from anyone of u guys/girls that would do the needfull
>i.e. elimiate html tags in a .html page.


   Perl FAQ, part 9:

      "How do I remove HTML from a string?"


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Wed, 10 Nov 1999 23:54:49 -0800
From: Seshadri Sriperumbudur <seshadri9@worldnet.att.net>
Subject: Re: regular expression to parse html out
Message-Id: <382A7649.FDB51265@worldnet.att.net>

Did you check the perlfaqs on the web (perl.com or CPAN)?? I remember
seeing a one-liner for your type of problem there couple of weeks back.

- Sesh


vod wrote:

> Hello,
>
> Before u say anything, i want to say that
> i know it may not be wise but never the less i am trying to make a
> small search script for my web-site. I want the script to search
> thru the .htm* pages but only the text that is outside the html tags,
> i.e. that is outside <  > tags.
> At the moment i have the script ready that searches all the page
> blindly what i was hoping to make a regular expression that could
> eliminate html tags < >.
> Basically i think the reg ex has to look for any word starting
> with "<" followed by anything and ending with ">".
>
> I am not very good at reg exes so i was hoping to find a
> a reg exes from anyone of u guys/girls that would do the needfull
> i.e. elimiate html tags in a .html page.
>
>  Thats it.
>   V0D



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

Date: Thu, 11 Nov 1999 04:02:34 GMT
From: fundman@yahoo.com
Subject: using perl scripts to paste ads on remote servers
Message-Id: <382a3fc4.14348374@news.direcpc.com>

I'm trying to serve ads on someone else's site via an ad server perl
script I have. I do it on my own server by using a Server Side Include
as follows:

<!--#include virtual="cgi-bin/adserver.ps?adlocation"-->

This won't work on the remote server, of course. I don't want to do it
with frames and I really want to use my server. Is there a way to do
this? BTW, if you were wondering - yes, the ad does appear as it
should if you were to enter the full URL version of the above tag,
e.g. - http://www.domain.com/cgi-bin/adserver.ps?adlocation

Thanks in advance for your help!


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

Date: Thu, 11 Nov 1999 06:26:03 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Re: W95 & gethostbyname questions
Message-Id: <slrn82ko9r.nkt.njc@dmc.uucp>

On Wed, 10 Nov 1999 17:14:01 -0800, David Cassell wrote:

>You might want to check the FAQ too.  Type this at a command
>prompt:
>
>perldoc -q hostname
>
>I know you're blushing now...

DOH! DOH!

-- 
Linux Home Automation           Neil Cherry             ncherry@home.net
http://members.home.net/ncherry                         (Text only)
http://meltingpot.fortunecity.com/lightsey/52           (Graphics GB)



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

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


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