[25948] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8167 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 12 18:05:34 2005

Date: Sun, 12 Jun 2005 15:05:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 12 Jun 2005     Volume: 10 Number: 8167

Today's topics:
    Re: Glob Q <john@castleamber.com>
    Re: Glob Q <jurgenex@hotmail.com>
    Re: Glob Q <Mark.Seger@hp.com>
    Re: Glob Q <shawn.corey@sympatico.ca>
    Re: Glob Q xhoster@gmail.com
    Re: Glob Q <jkrugman345@yahbitoo.com>
        Parsing HTML using TreeBuilder - how to get the "next"  <news@horrocks.plus.com>
    Re: Parsing HTML using TreeBuilder - how to get the "ne <news@horrocks.plus.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 12 Jun 2005 14:27:51 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Glob Q
Message-Id: <Xns96736041574F4castleamber@130.133.1.4>

J Krugman wrote:

> Why is it that I find globs so mysterious?  Am I alone in this?
> Or is it a common thing?
> 
> Anyway, my question is this: what's the difference between $x, $y,
> and $z in
> 
> my $x = *VAR;
> my $y = local *VAR;
> my $z = do { local *VAR };

Don't use wrong tech lingo. I wouldn't call any of those a glob.

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


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

Date: Sun, 12 Jun 2005 14:40:07 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Glob Q
Message-Id: <bPXqe.1766$1q5.1121@trnddc02>

J Krugman wrote:
> Why is it that I find globs so mysterious?  Am I alone in this?
> Or is it a common thing?

I agree, it can be tricky for people who are not used to 
Unix-style/csh-style globbing.

> Anyway, my question is this: what's the difference between $x, $y,
> and $z in
>
> my $x = *VAR;
> my $y = local *VAR;
> my $z = do { local *VAR };

I must be missing something. What do those variable definition have to do 
with glob()?

jue 




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

Date: Sun, 12 Jun 2005 11:34:56 -0400
From: Mark Seger <Mark.Seger@hp.com>
Subject: Re: Glob Q
Message-Id: <42ab9f04@usenet01.boi.hp.com>


> I must be missing something. What do those variable definition have to do 
> with glob()?

I think what the author of the note may be asking about is the 
difference between 'my', 'local' and no explicit declaration which 
effects scope and not globs.  I believe, but am also sure someone else 
will procide a more precise definition, is that 'my' limits the scope to 
the block in which it's asserted, 'local' carries the scope into other 
blocks that are entersd from the one in which it's asserted and if there 
is no explicit declaration, the variable is global.  sort of...
-mark



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

Date: Sun, 12 Jun 2005 13:34:53 -0400
From: Shawn Corey <shawn.corey@sympatico.ca>
Subject: Re: Glob Q
Message-Id: <%m_qe.950$Qr3.83816@news20.bellglobal.com>

John Bokma wrote:
> J Krugman wrote:
> 
> 
>>Why is it that I find globs so mysterious?  Am I alone in this?
>>Or is it a common thing?
>>
>>Anyway, my question is this: what's the difference between $x, $y,
>>and $z in
>>
>>my $x = *VAR;
>>my $y = local *VAR;
>>my $z = do { local *VAR };
> 
> 
> Don't use wrong tech lingo. I wouldn't call any of those a glob.
> 

What he is talking about are type globs, to be confused with file globs. 
File globs are used with the function glob().

Type globs are used to alias variables. Perl 4 did not have references, 
so you had to use type globs instead. In Perl 5, use references except 
for file handles, then 'use FileHandle;'

Type globs, like formats, left over from Perl 4 and people rarely use 
them since there are better ways to do things.


    --- Shawn


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

Date: 12 Jun 2005 18:05:29 GMT
From: xhoster@gmail.com
Subject: Re: Glob Q
Message-Id: <20050612140529.961$GD@newsreader.com>

John Bokma <john@castleamber.com> wrote:
> J Krugman wrote:
>
> > Why is it that I find globs so mysterious?  Am I alone in this?
> > Or is it a common thing?
> >
> > Anyway, my question is this: what's the difference between $x, $y,
> > and $z in
> >
> > my $x = *VAR;
> > my $y = local *VAR;
> > my $z = do { local *VAR };
>
> Don't use wrong tech lingo. I wouldn't call any of those a glob.

It seems to me that perldoc would.  Perhaps you can suggest a better term?

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Sun, 12 Jun 2005 20:01:25 +0000 (UTC)
From: J Krugman <jkrugman345@yahbitoo.com>
Subject: Re: Glob Q
Message-Id: <d8i4al$8fo$1@reader1.panix.com>

In <Xns96736041574F4castleamber@130.133.1.4> John Bokma <john@castleamber.com> writes:

>J Krugman wrote:

>> Why is it that I find globs so mysterious?  Am I alone in this?
>> Or is it a common thing?
>> 
>> Anyway, my question is this: what's the difference between $x, $y,
>> and $z in
>> 
>> my $x = *VAR;
>> my $y = local *VAR;
>> my $z = do { local *VAR };

>Don't use wrong tech lingo. I wouldn't call any of those a glob.

Ignorance is OK.  Righteous ignorance is insufferable:

r news.panix.com ...
Organization: (NONE)
X-No-Confirm: yes

In <Xns96736041574F4castleamber@130.133.1.4> John Bokma <john@castleamber.com> writes:

>J Krugman wrote:

>> Why is it that I find globs so mysterious?  Am I alone in this?
>> Or is it a common thing?
>>
>> Anyway, my question is this: what's the difference between $x, $y,
>> and $z in
>>
>> my $x = *VAR;
>> my $y = local *VAR;
>> my $z = do { local *VAR };

>Don't use wrong tech lingo. I wouldn't call any of those a glob.

Ignorance is OK.  Righteous ignorance is insufferable:

% perl -de 1

Loading DB routines from perl5db.pl version 1.23
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(-e:1):   1
  DB<1> x \*VAR
0  GLOB(0x8448028)
   -> *main::VAR


jill

-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.



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

Date: Sun, 12 Jun 2005 22:04:35 +0100
From: Bruce Horrocks <news@horrocks.plus.com>
Subject: Parsing HTML using TreeBuilder - how to get the "next" tag?
Message-Id: <wWaBRTSjNKrCFwtS@horrocks.plus.com>

I have a large (6Mb) HTML file that has been generated by a software 
application's "document" function which I am trying to parse using 
HTML::TreeBuilder. It consists of lots of lines in the form:

<p> Text text text text text
<p> Text text text text text
 ...
<p> Text text text text text
<h1>Section Heading</h1>
<p> Blah blah blah blah
<p> Blah blah blah blah
<p> Blah blah blah blah
 ...

I can use $tree->look_down() to find the h1 heading but then, how do I 
get the next line? All the examples assume that the thing you want is a 
*child* of the heading, not the *next* tag.

This requirement seems to be so basic that I must be missing something 
but I can't see what. Perl is ActiveState 5.8.6 on Win32.

Thanks in advance

-- 
Bruce Horrocks
Surrey
England
<firstname>@<surname>.plus.com -- fix the obvious for email


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

Date: Sun, 12 Jun 2005 22:26:36 +0100
From: Bruce Horrocks <news@horrocks.plus.com>
Subject: Re: Parsing HTML using TreeBuilder - how to get the "next" tag?
Message-Id: <SmxJtlSMiKrCFwLy@horrocks.plus.com>

In message <wWaBRTSjNKrCFwtS@horrocks.plus.com>, Bruce Horrocks 
<news@horrocks.plus.com> writes
>I can use $tree->look_down() to find the h1 heading but then, how do I 
>get the next line? All the examples assume that the thing you want is a 
>*child* of the heading, not the *next* tag.

Okay, found it (I think)
HTML::Element->right() looks to be what I'm after. Sorry for the noise.

Regards,
-- 
Bruce Horrocks
Surrey
England
<firstname>@<surname>.plus.com -- fix the obvious for email


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

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


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

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

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


------------------------------
End of Perl-Users Digest V10 Issue 8167
***************************************


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