[10002] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3595 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 31 11:05:12 1998

Date: Mon, 31 Aug 98 08:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 31 Aug 1998     Volume: 8 Number: 3595

Today's topics:
    Re: comp.lang.perl.windows.misc <xxxgormxxx@p4.no>
        dbmclose screws up my foreach loop serstad@acc.jc.edu
    Re: Hats off to Tom Phoenix (Norman UNsoliciteds)
        How can I run cgi in NT? <hkonomi@lincoln.org.al>
        mail relay check <bor@kiev-konti.com>
    Re: mod_perl configuration marad@usa.net
        Need CGI Programmer <brettv@cableinet.co.uk>
    Re: Perl "<!--#exec" with IIS, How? scott@softbase.com
    Re: Perl compiler <see.my.address.below@domain.com>
    Re: Perl compiler (John Moreno)
    Re: Perl compiler (Greg Bacon)
    Re: Perl Docs.. forget the original post (Author) (Norman UNsoliciteds)
        PERL is horrible <julius@clara.net>
    Re: PERL is horrible (Mike Stok)
        perl wrapper in shell? (Stephan Jager)
    Re: perl wrapper in shell? <sneaker@sneex.fccj.org>
        router config look-alike? <sjackson@nyx.net>
        Running Perl scripts on background from Web <bohorquez_bernard@non-hp-france-om4.om.hp.com>
    Re: Running Perl scripts on background from Web <sneaker@sneex.fccj.org>
    Re: Using OLE to get Excel VBA using the clipboard scott@softbase.com
    Re: Win32 Q: Reading Outlook 98 files <xxxgormxxx@p4.no>
        Yet another RegX Question. chad@gurucom.net
    Re: Yet another RegX Question. <sneaker@sneex.fccj.org>
    Re: Yet another RegX Question. (Larry Rosler)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 31 Aug 1998 16:27:18 +0200
From: Gorm Haug Eriksen <xxxgormxxx@p4.no>
Subject: Re: comp.lang.perl.windows.misc
Message-Id: <m3zpclteex.fsf@tehran.p4inet.no>


Good ide, but almost 90% of the "win32 perl questions" here are about
regular win32 questions, that shouldn't be here in the first place.

- Gorm

Dan Nguyen <nguyend7@msu.edu> writes:

> IMHO, I realy think there is a need for comp.lang.perl.windows.misc,

-- 
Gorm 

WARNING: By removing all the x's in my emailaddress, you also
confirm that you will not use it for commercial advertising.


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

Date: Mon, 31 Aug 1998 13:30:13 GMT
From: serstad@acc.jc.edu
Subject: dbmclose screws up my foreach loop
Message-Id: <6se8h6$7nl$1@nnrp1.dejanews.com>

Hi,

Have figured out a workaround, but would like to figure out a "huh?" as
well...

Suppose I have a loop around a number of dbmopens and dbmcloses, possibly to
loop through a number of directories that have the exact same database file
in them.  Every time it gets to the DBMclose, it pretty much kills my loop
control variable.  The loop still gets executed, but I get strange results.

However, commenting out the dbmclose allows the loop to work perfectly.

Obviously I don't understand exactly how the Dbmclose works -- any
suggestions? (code below) Thanks

sub wanted{
	$File::Find::prune=1;
	-d and $Dirs{$File::Find::name}++;
}
find(\&wanted, $directory);

foreach $mydir (sort keys %Dirs) {

	next if ($mydir eq $directory);
	$thisdb = $mydir . '/data_db';
	print "\n$mydir--$thisdb\n";
	#The $mydir variable is what gets screwed up

	dbmopen (%mytest, $thisdb, 0666);
	print "\n--$mytest{'SOMEFIELD'}--\n";
	#dbmclose %mytest;
	#Comment this line out, works great.  Leave it in and it screws up
}

Thanks a lot!

Shane Erstad
serstad@acc.jc.edu

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 31 Aug 1998 22:27:41 +0900
From: No.unsoiliciteds@dead.end (Norman UNsoliciteds)
Subject: Re: Hats off to Tom Phoenix
Message-Id: <No.unsoiliciteds-3108982227410001@cs11i09.ppp.infoweb.or.jp>



> On Mon, 31 Aug 1998 04:15:51 +0900, Norman UNsoliciteds wrote :
> >It's possible, I have seen Abbigail's flamings interpreted as helpful yet
> >dispassionate advice ;)

(Jonathan Stowe) wrote:
+>  Oh but it is - perhaps a little concise for some tastes, given, but
+>  nonetheless "helpful yet dispassionate advice".
But maybe the dispassionateness is a form of misanthropy: have you thought
of that? ;^)

-- 
<<
Plato was a rather odd fellow he would engage you in conversation only to point out your follies
>>
Sophie's World


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

Date: Mon, 31 Aug 1998 16:19:24 +0200
From: Hektor Konomi <hkonomi@lincoln.org.al>
Subject: How can I run cgi in NT?
Message-Id: <35EAB0EC.2825B936@lincoln.org.al>

    Hi everybody,

    Anybody knows how can cgi scripts written in perl be run in a NT 4
Server running IIS? I mean, should I add anything to the scripts, like
it's done in UNIX, or any special software is needed? Thanks in advance
for your help.
                                                                    Best
regards,

Hektor Konomi.



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

Date: Mon, 31 Aug 1998 17:33:02 +0300
From: "Vladimir Bormotov" <bor@kiev-konti.com>
Subject: mail relay check
Message-Id: <6sec6m$arj$1@www.kiev-konti.com>

        Hi!

 How check exist mail relay for given e-mail address, or not?

        Bor.




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

Date: Mon, 31 Aug 1998 14:00:42 GMT
From: marad@usa.net
Subject: Re: mod_perl configuration
Message-Id: <6seaab$9m7$1@nnrp1.dejanews.com>

Yes, yes. Just for fun, I tried commenting out the .cgi line in my srm.conf
(and then restarting the server, of course), but no cigar. Other ideas,
anyone?

In article <comdog-ya02408000R2808982119520001@news.panix.com>,
  comdog@computerdog.com (brian d foy) wrote:
> In article <6s72au$7gi$1@nnrp1.dejanews.com>, marad@usa.net posted:
>
> >After many hassles, I successfully complied Apache 1.3.1 for Linux with
> >mod_perl, but I still can't seem to get it to actually run scripts. Instead,
> >it just displays the script. I have searched the newsgroups and FAQs over and
> >over, but nothing seems to work. My srm.conf looks like this:
>
> >AddHandler cgi-script .cgi  #Do I need this line? Is it in the way?
>
> i have this commented out in my config, but that doesn't mean anything.
> my servers don't allow executable content outside of designated
> directories.
>
> >Alias /perl/ /usr/apache/share/perl/
> ><Location /perl>
> >SetHandler perl-script
> >PerlHandler Apache::Registry
> >Options ExecCGI
> ></Location>
>
> my configuration looks very similar to yours (Stronghold is a little
> different than Apache for configuration).  i know this is a stupid
> question, but have you reloaded the server so that the new
> configuration takes affect?  that bites me a couple times a week :)
>
> good luck :)
>
> --
> brian d foy                                  <comdog@computerdog.com>
> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
> Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
> Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 31 Aug 1998 15:05:34 +0100
From: "Brett" <brettv@cableinet.co.uk>
Subject: Need CGI Programmer
Message-Id: <6seacr$ash$1@news3.cableinet.co.uk>

Hi there, Im looking for a web based -email,  script. Something like Hotmail
or Yahoo , but on a smaller scale

Interested in making a few $$.

Contact me
xtraint@hotmail.com




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

Date: 31 Aug 1998 13:04:24 GMT
From: scott@softbase.com
Subject: Re: Perl "<!--#exec" with IIS, How?
Message-Id: <35ea9f58.0@news.new-era.net>

Wayne Cochrane (wcochrane@pobox.com) wrote:
> Can I issue the line below on an IIS server running Perl? 

IIS doesn't support SSI. It has its own ASP interface for such things.

> When using Perl for IIS, do ALL the
> same Unix calls work? There seems to be no distinction out here.

For some values of "work". If "bomb" is a value of work, then yes. 99%
of Perl is portable to Win32. The other 1%, calls like fork() and
flock(), are not. Given the radical differences in the two system
architectures, this is pretty amazing.  Also, programs which use
internal Perl facilities rather than calling external programs stand a
much better chance of working.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 31 Aug 1998 10:36:55 -0400
From: Bruce Barnett <see.my.address.below@domain.com>
Subject: Re: Perl compiler
Message-Id: <yekr9xxqku0.fsf@grymoire.birch>

abigail@fnx.com (Abigail) writes:

> And before you ask. I work for a software company. The pricetags of our
> products range from $300k till $6M. But we ship code to any client that
> asks for it. All 400 Mb of it.


Good for you. But don't make the mistake that because the customer
that buys a custom package feels one way, that the developer agrees
with that customer. Some people provide a service, and do the best to
provide the customer with the features they want. I've been using
Internet freeware for many years. This is the first year that the
press seems to think freeware is a good idea.  Some customers
understood that 20 years ago. Some customers understand that now. Some
customers will understand that concept in another 20 years. Some
customers never will.  And some people have to deal with all sorts of
customers in their lives.

The bottom line is this: asking about a PERL compiler is not a valid
reason to insult someone. This is what happened. It is wrong.

-- 
Bruce  <barnett at crd. ge. com> (speaking as myself, and not a GE employee)


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

Date: Mon, 31 Aug 1998 10:45:13 -0400
From: phenix@interpath.com (John Moreno)
Subject: Re: Perl compiler
Message-Id: <1demdub.awy9bs1c2f8olN@roxboro0-009.dyn.interpath.net>

In comp.lang.perl.misc Snowhare <snowhare@xmission.xmission.com> wrote:

> John Moreno <phenix@interpath.com> wrote:
> >In comp.lang.perl.misc I R A Aggie <fl_aggie@thepentagon.com> wrote:
> >
> >> Ah, security by obscurity.
> >> 
> >> James - hint: it ain't secure just 'cause you don't think anyone knows
> >>         about the security hole in your system...
> >
> >No, but it secure as long as you are correct.
> 
-snip-
> Some security holes are so bad you can fall through them by *accident*.

Which means you won't be correct for very long.  The trick is well
implemented obscurity, putting plain text passwords into a binary isn't
very obscure.

-- 
John Moreno


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

Date: 31 Aug 1998 14:47:40 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Perl compiler
Message-Id: <6sed2c$qrj$4@info.uah.edu>

In article <54af4m1j5c.fsf@alpha.orion.it>,
	Alessandro Forghieri <alf@orion.it> writes:
: Does this mean that publishing your security procedures
: on the morning paper, sandwiched between 'High and low temperatures'
: and obituaries is advisable?

Consider another form of security, namely that a given bridge won't
collapse when you drive across it.  The engineering plans for a
bridge are subject to review by other engineers because those other
engineers are likely to be able to spot any problems that may exist.
I trust secure systems that have been reviewed by many thousands or
even millions of eyes (like ssh) way before I trust secret, closed
systems that only three people have reviewed (like anything Microsoft
would call security).

: I do not see any banks publishing the plans of their caveaus, or
: the make/year of their safes. I wonder why.

It's unfortunate that people believe in security by obscurity.  If
banks did publish their security measures, it's likely that someone
else knowledgable would point out the flaws (or offer to do so for
consulting rates).

: Surely an environment that does not unnecessarily make public 
: details of their security measures cannot be less secure, now can it?
: (Note that this would be an 'obscure' environment).

It certainly can be.  Consider the case where someone who works for the
bank's security company finds a hole in the security system.  This
would enable to person to drain the bank of its funds.  If the security
system had been reviewed by several review groups, the chance of this
happening is much smaller.

Greg
-- 
There is always death and taxes. However death doesn't get worse every year.


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

Date: Mon, 31 Aug 1998 22:21:44 +0900
From: No.unsoiliciteds@dead.end (Norman UNsoliciteds)
Subject: Re: Perl Docs.. forget the original post (Author)
Message-Id: <No.unsoiliciteds-3108982221450001@cs11i09.ppp.infoweb.or.jp>


> Norman UNsoliciteds <No.unsoiliciteds@dead.end> writes:
> 
> Sfunny somebody posts this everytime the docs are mentioned in this
> context - why is it so much energy goes into making free software
> packages but the documents are relatively fossilised?

Russ Allbery <rra@stanford.edu> wrote: 
<*> Because there are more good free software programmers than there are good
<*> free documentation writers.

how about "There's more status/recognition as <<Just Another Perl Hacker>>
if you have you're name in the Cpan packages archive rather than your name
on the Perl Man".

It would be rather interesting to see which of the contributors to the
Cpan archive have also written books or give training courses on Perl (for
money). 
Nothing wrong in making money, don't get me wrong without food we die, but in 
the context of flaming for ignorance of the fundamentals of programming,
those that do this do seem to want thier digital fieifdom and eat it.

In an aside for this - I have access to a phenomenal quatitiy of
tech/programming  documentation about my own OS for free, which explains
things in clear tems and then gives the same explainations in C and
Pascal. Why can't the Perl DOCS do this? (OK maybe skipping the Pascal)

(Guessing which OS this is is left as an exercise for the reader)

-- 
<<It took a learned man to teach me the true nature of ignorance - a willlingness to believe that learning was finite.>>

Norman Unsoliciteds - the Wilderness Years, Boscara Press 1967.


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

Date: Mon, 31 Aug 1998 15:28:31 +0100
From: "Jules" <julius@clara.net>
Subject: PERL is horrible
Message-Id: <6secal$m2o$1@eros.clara.net>

Dear all, I'm a newbie in perl and I find it absolutely terrifying. I know C++ and Java, but never
done any scripting language (well, err, unix shell scripts don't count right?) and perl doesn't give
me a good impression as one......

I'm struggling to understand Larry Wall and the lot, on the camel book Programming Perl published by
O'Reilly. Is there any other "dummy" or "die unless $jules =~ s/java_mind/perl_mind/g" book on Perl
which is good? I think I will need that. =(

Cheers,
            Jules

***There is not enough darkness in the whole world to extinguish the light of a small candle***






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

Date: 31 Aug 1998 14:44:12 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: PERL is horrible
Message-Id: <6secrs$t7m@news-central.tiac.net>

In article <6secal$m2o$1@eros.clara.net>, Jules <julius@clara.net> wrote:
>Dear all, I'm a newbie in perl and I find it absolutely terrifying. I
>know C++ and Java, but never
>done any scripting language (well, err, unix shell scripts don't count
>right?) and perl doesn't give
>me a good impression as one......
>
>I'm struggling to understand Larry Wall and the lot, on the camel book
>Programming Perl published by
>O'Reilly. Is there any other "dummy" or "die unless $jules =~
>s/java_mind/perl_mind/g" book on Perl
>which is good? I think I will need that. =(

Programming Perl is more of a reference book than a tutorial, maybe you
should consider Learning Perl by Randal Schwartz and Tom Christiansen (or
Learning Perl on Win32 if you're on a Win32 system) whic are published bu
O'Reilly - see http://www.oreilly.com

Hope this helps,

Mike


-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: 31 Aug 1998 13:19:13 GMT
From: stephanj@sci.kun.nl (Stephan Jager)
Subject: perl wrapper in shell?
Message-Id: <6se7sh$13k$1@wnnews.sci.kun.nl>

Hello,

I'm using various perl scrips on different unix systems, where perl is at
different locations
I want to use somethign like
#!`which perl`
but that doesn't work really. Anybody know how to write some kinda wrapper
which executes perl (including options ofcourse) from perl from the Path? I
could use 2 different files, one shell file and one perl file, but I wanne
have them at one single file. Anybody some idea?

Stephan



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

Date: Mon, 31 Aug 1998 09:59:33 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: perl wrapper in shell?
Message-Id: <35EAAC45.22F3DF6F@sneex.fccj.org>

Stephan Jager wrote:
> 
> Hello,
> 
> I'm using various perl scrips on different unix systems, where perl is at
> different locations
> I want to use somethign like
> #!`which perl`
> but that doesn't work really. Anybody know how to write some kinda wrapper
> which executes perl (including options ofcourse) from perl from the Path? I
> could use 2 different files, one shell file and one perl file, but I wanne
> have them at one single file. Anybody some idea?
> 
> Stephan

Wrap your perl in a bash shell.

Just a thought,
-Sneex- 
__________________________________________________________________
Bill Jones | FCCJ Webmaster | Murphy's Law of Research:
           Enough research will tend to support your theory.


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

Date: Mon, 31 Aug 1998 14:32:03 GMT
From: Steven Jackson <sjackson@nyx.net>
Subject: router config look-alike?
Message-Id: <Pine.SUN.3.96.980831082436.20745B-100000@nyx>

Greetings all,

Has anyone seen or written a shell replacement app to make a special
account on a Linux box (i.e. "router") look and act like a router
configurator? Sounds like a good training piece for those of us who
don't have access to megabuck routers and reduces the culture shock of
moving from a shell account to a dedicated router if the budget ever
approves one.

Including masquerading support would help lots, too. 

Thanks!

Steve



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

Date: Mon, 31 Aug 1998 11:27:02 +0200
From: Bohorquez <bohorquez_bernard@non-hp-france-om4.om.hp.com>
Subject: Running Perl scripts on background from Web
Message-Id: <35EA6C66.3B1B@non-hp-france-om4.om.hp.com>

Hi,

I need to launch a perl script from an HTML page.
Since there, no problem.
But I want this script to be launched on background.

I think the equivalent command in shell would be :
nohup script_name >| /tmp/nohup.out &

I tried to run this from a CGI Perl Script using exec and found that
exec waits for the command to terminate.

So I tried to launch it the same way but from a manually forked process
using :

if ($pid=fork){
#Father
print "Content-type: text/html\n\n\n";
# HTML content
}
else{
autoflush;
exec("nohup script >| /tmp/nohup.out &");
}

Curiously, it seems that Netscape server waits for all processes to
terminates (father and sonn).

Someone an idea ?


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

Date: Mon, 31 Aug 1998 09:57:29 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Running Perl scripts on background from Web
Message-Id: <35EAABC9.AE160C8B@sneex.fccj.org>

Bohorquez wrote:
> 
> Hi,
> 
> I need to launch a perl script from an HTML page.
> Since there, no problem.
> But I want this script to be launched on background.
> 
> I think the equivalent command in shell would be :
> nohup script_name >| /tmp/nohup.out &
> 
> I tried to run this from a CGI Perl Script using exec and found that
> exec waits for the command to terminate.
> 
> So I tried to launch it the same way but from a manually forked process
> using :
> 
> if ($pid=fork){
> #Father
> print "Content-type: text/html\n\n\n";
> # HTML content
> }
> else{
> autoflush;
> exec("nohup script >| /tmp/nohup.out &");
> }
> 
> Curiously, it seems that Netscape server waits for all processes to
> terminates (father and sonn).
> 
> Someone an idea ?

:]

Yes.  Be smarter than your machine and have the calling CGI
e-mail the script you want to run in the background :]

I have found a universe beyond CGI ... it's wonders are magic.

HTH,
-Sneex- 
__________________________________________________________________
Bill Jones | FCCJ Webmaster | Murphy's Law of Research:
           Enough research will tend to support your theory.


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

Date: 31 Aug 1998 13:18:44 GMT
From: scott@softbase.com
Subject: Re: Using OLE to get Excel VBA using the clipboard
Message-Id: <35eaa2b4.0@news.new-era.net>

Lynn Wilson (lynn@swcp.com) wrote:
> I am trying to extract the embedded VBA code that is found in
> Excel modules.

WOW! It never ceases to amaze me some of the strange, off the wall
things people want to do with programs like Excel.

First of all, frankly I doubt anyone in the universe but you has ever
tried to do this, and the odds of finding any help are astronomical.
This is not something that you'd do everyday.

I've never done it, but I know the Visual Basic Editor has an Export...
menu item. If you knew how to program the VBE, you could call that.
Problem is, that's one aspect of VBA which I have never seen discussed
anywhere. The editor *is* programmable, it's just that I've
never seen any examples of how it could be done. The Office 97
Visual Basic Programmer's Guide mentions a VBE object model. That
might be a starting place.

The obvious problem with Excel and Perl is the Excel object model is a
disaster area. In the online help, the "Modules()" collection of the
Workbook does not appear (and I wonder if you're using some really old
Excel).

What I would do is create an Excel macro that did what you 
wanted, and call Application.Run to run it from Perl.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 31 Aug 1998 16:10:00 +0200
From: Gorm Haug Eriksen <xxxgormxxx@p4.no>
Subject: Re: Win32 Q: Reading Outlook 98 files
Message-Id: <m33eaduts7.fsf@tehran.p4inet.no>

"Walter Torres" <walter@tscinternet.com> writes:
> I would like to read my Outlook files via Perl.
> I have no idea where to start to look for this type of info.
> Anyone know where I can start to research this topic?

What you need:

1.) Knowledge of COM
2.) Knowledge of Win32::OLE
3.) Knowledge of Outlook98 automation

Where you get it:

1.) www.microsoft.com
2.) www.activestate.com or libwin
3.) www.microsoft.com or outlook

You can do the same from perl, as you can do from VBA or any Active
Scripting language that supports use of automation.

Basicly, you can't go on the outlook file, but you need to call
functions in the outlook application model, and you need to do
<whatever> with the different folders.

It's no use telling you how to do it, since you haven't tooled me what
you want to do. I will not tell you how to do it, since what you realy
need, is some basic understanding of the use of COM/ActiveX.

Last, this isn't realy a Perl question. You will find better groups to
ask for information under the microsoft.public. hiarchy.

-- 
Gorm 

WARNING: By removing all the x's in my emailaddress, you also
confirm that you will not use it for commercial advertising.


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

Date: Mon, 31 Aug 1998 13:43:17 GMT
From: chad@gurucom.net
Subject: Yet another RegX Question.
Message-Id: <6se99l$8ea$1@nnrp1.dejanews.com>



Ok, This works great.  But if 'news' or 'http' is after the href=" I want
to skip it, how do I do that?

(@cats) = $content =~ /<li><a href="(.*?)"><b>/ig;



???????

(@cats) = $content =~ /<li><a href="^(http|news)(.*?)"><b>/ig;

thanks,

-chad


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Mon, 31 Aug 1998 10:01:29 -0400
From: Bill 'Sneex' Jones <sneaker@sneex.fccj.org>
Subject: Re: Yet another RegX Question.
Message-Id: <35EAACB9.75F547D6@sneex.fccj.org>

chad@gurucom.net wrote:
> 
> Ok, This works great.  But if 'news' or 'http' is after the href=" I want
> to skip it, how do I do that?
> 
> (@cats) = $content =~ /<li><a href="(.*?)"><b>/ig;
> 
> ???????
> 
> (@cats) = $content =~ /<li><a href="^(http|news)(.*?)"><b>/ig;
> 
> thanks,
> 
> -chad
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

next if $url =~ /^(a href=http:|a href=news:)/;
-- 
__________________________________________________________________
Bill Jones | FCCJ Webmaster | Murphy's Law of Research:
           Enough research will tend to support your theory.


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

Date: Mon, 31 Aug 1998 07:42:52 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Yet another RegX Question.
Message-Id: <MPG.1054564982edc390989818@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <6se99l$8ea$1@nnrp1.dejanews.com> on Mon, 31 Aug 1998 13:43:17 
GMT, chad@gurucom.net <chad@gurucom.net> says...
 ...
> (@cats) = $content =~ /<li><a href="^(http|news)(.*?)"><b>/ig;

  (@cats) = $content =~ /<li><a href="(?:http|news)(.*?)"><b>/ig;

The '?:' asks that the contents of the binding parentheses *not* be saved 
in the result from executing the regex.  I took out the '^' because I 
doubt that you really want to match a literal '^' at that point.

Have you read, and re-read, `perldoc perlre` and/or Friedl's book, 
"Mastering Regular Expressions"?  This and your other questions are all 
answered there in great detail.
 
-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 3595
**************************************

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