[26934] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8902 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 30 18:05:39 2006

Date: Mon, 30 Jan 2006 15:05:10 -0800 (PST)
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, 30 Jan 2006     Volume: 10 Number: 8902

Today's topics:
    Re: FAQ 8.46 What's the difference between require and  <xx087@freenet.carleton.ca>
    Re: FAQ 8.46 What's the difference between require and  <brian.d.foy@gmail.com>
    Re: How can I remove trailing commas? <rvtol+news@isolution.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 30 Jan 2006 17:33:33 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: FAQ 8.46 What's the difference between require and use?
Message-Id: <slrndtsjfd.5bi.xx087@smeagol.ncf.ca>

At 2006-01-30 12:03PM, PerlFAQ Server <comdog@pair.com> wrote:
>          3)  require Module is like require "Module.pm", except the former
>              3.1: translates each "::" into your system's directory separator.
>              3.2: primes the parser to disambiguate class Module as an indirect object.

What does 3.2 mean?

-- 
Glenn Jackman
Ulterior Designer


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

Date: Mon, 30 Jan 2006 13:12:41 -0600
From: brian d  foy <brian.d.foy@gmail.com>
Subject: Re: FAQ 8.46 What's the difference between require and use?
Message-Id: <300120061312418230%brian.d.foy@gmail.com>

In article <slrndtsjfd.5bi.xx087@smeagol.ncf.ca>, Glenn Jackman
<xx087@freenet.carleton.ca> wrote:

> At 2006-01-30 12:03PM, PerlFAQ Server <comdog@pair.com> wrote:
> >          3)  require Module is like require "Module.pm", except the former

> >              3.2: primes the parser to disambiguate class Module as an
> indirect object.

> What does 3.2 mean?

It means that Perl parser can understand things such as

   my $object = new Module @args

To do that, it need a hint of what the bareword "Module" means.


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

Date: Mon, 30 Jan 2006 17:30:44 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: How can I remove trailing commas?
Message-Id: <drliik.dk.1@news.isolution.nl>

Abigail schreef:
> Dr.Ruud:
>>  Jame Pearl:

>>> How can I remove any trailing commas from the end of $var?
>>> I tried using
>>>    $var =~ s/,+$//
>>> but it didn't work.
>>
>>  If
>>    $var =~ s/,+$//m;
>>  does work, see `perldoc perlre` again.
>
> Hmmm.
>
>     $ perl -wle '$var = "foo,\nbar,"; $var =~ s/,$//m; print $var'
>     foo
>     bar,
>
> That doesn't remove the comma at "the end".

If

  $var =~ s/,+$//gm;

does even work better, then Jame's data is complexer than I was prepared
to assume.

Next episode:

  $var =~ s/,+(?=\s*$)//;

(which also removes more than "trailing commas")


And  s/,+(?=\s*)$//  isn't the same, see perlre:
"two zero-width assertions next to each other work
as though they're ANDed together"

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

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


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