[25958] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8177 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 16 14:05:25 2005

Date: Thu, 16 Jun 2005 11:05:05 -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           Thu, 16 Jun 2005     Volume: 10 Number: 8177

Today's topics:
    Re: "END failed" -- but why? xhoster@gmail.com
        [OT] Re: File-Find and Samba share <1usa@llenroc.ude.invalid>
    Re: Decorator pattern - IO::file (Anno Siegel)
    Re: Decorator pattern - IO::file (Gary E. Ansok)
    Re: File-Find and Samba share <apeiron+usenet@coitusmentis.info>
    Re: Module to match file names against a wildcard spec? <lawshouse.public@btconnect.com>
    Re: Module to match file names against a wildcard spec? <1usa@llenroc.ude.invalid>
    Re: Module to match file names against a wildcard spec? <1usa@llenroc.ude.invalid>
    Re: Module to match file names against a wildcard spec? (Anno Siegel)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 16 Jun 2005 15:46:29 GMT
From: xhoster@gmail.com
Subject: Re: "END failed" -- but why?
Message-Id: <20050616114629.926$Ix@newsreader.com>

Matthias Urlichs <smurf@smurf.noris.de> wrote:
> One of my programs exits with these lines, after its last line has
> executed:

What modules are you using in your script?


> Use of uninitialized value in null operation, <F> line 1796.
> Undefined subroutine &main:: called, <F> line 1796.
> END failed--call queue aborted at tools/mig.strings line 1, <F> line
> 1796.

Do you have any END blocks in your script?  Do you actually open a
filehandle named F?

>
> Well, that's helpful.  :-/
> Any ideas on how to figure out *where* and *why* that happens would be
> greatly appreciated.

Xho

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


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

Date: Thu, 16 Jun 2005 17:27:43 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: [OT] Re: File-Find and Samba share
Message-Id: <Xns967788F0FEF2Basu1cornelledu@127.0.0.1>

Christopher Nehren <apeiron+usenet@coitusmentis.info> wrote in 
news:slrndb3bhg.2l9j.apeiron+usenet@prophecy.dyndns.org:

> On 2005-06-16, tlviewer scribbled these

>> thanks in advance,
> 
> You're welcome. Contrary to what one particular poster believes, saying
> "TIA" is not rude or anything silly like that.

Well, there is at least one other person on this planet who agrees with me 
;-)

<URL: http://bbs.shii.org/read.php/download/1107039948/l20>

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: 16 Jun 2005 13:28:10 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Decorator pattern - IO::file
Message-Id: <d8rupa$2rj$1@mamenchi.zrz.TU-Berlin.DE>

bugbear  <bugbear@trim_papermule.co.uk_trim> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> >>
> >>Thanks for the pointer.
> >>As far as I (and google ...) can find,
> >>Perl layers appear to be a 'C' thing.
> >>http://www.faqs.org/docs/perl5int/x197.html
> >>
> >>I was think of something much simpler - e.g.
> >>a comment filtering "layer", which should be
> >>a 1 liner regex (in the right place...) in perl.
> > 
> > 
> > Comments of what language?  Only the most simple-minded comment parsers
> > are one-liners.  Usually, comment parsing and string (quote) parsing
> > must be done in conjunction.  That's more than one line for most target
> > languages.
> 
> Agreed. Comment stripping was an arbitrary example;
> I was thinking of assembler/postscript/Perl comments
> which (unusually, as you point out) are detectable by
> a trivial regexp.

    not "in # Perl"; # it isn't trivial

If I had to do this, I'd consider slurping the file on open(), pre-
process it, and then deliver the lines/bytes as requested.

> > Okay, here is a tie() example (I haven't played with IO layers yet).

[example snipped]

> > Anno
> 
> Thank you *very* much. I'll start from here. Can I assume that If I 
> overdefine read() (in StdHandle) the other methods (e.g. readline)
> are defined in terms of read() - or am I being optimistic?

I think they are independent, but you'd have to look at the source.

Anno


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

Date: Thu, 16 Jun 2005 17:29:49 +0000 (UTC)
From: ansok@alumni.caltech.edu (Gary E. Ansok)
Subject: Re: Decorator pattern - IO::file
Message-Id: <d8scud$dm5$1@naig.caltech.edu>

In article <42b16524$0$41904$ed2619ec@ptn-nntp-reader03.plus.net>,
bugbear  <bugbear@trim_papermule.co.uk_trim> wrote:
>Anno Siegel wrote:
>> Comments of what language?  Only the most simple-minded comment parsers
>> are one-liners.  Usually, comment parsing and string (quote) parsing
>> must be done in conjunction.  That's more than one line for most target
>> languages.
>
>Agreed. Comment stripping was an arbitrary example;
>I was thinking of assembler/postscript/Perl comments
>which (unusually, as you point out) are detectable by
>a trivial regexp.

Are they?  Try it on the line below, from Anno's example:

>>         $l =~ s/#.*//; # strip comments (or non-comments, see above)

There are even more complex examples that require more knowledge about
Perl, and I think may even involve loading and parsing module files.

Gary
-- 
Valuable Tip: Never assume that you and fighter pilots
have the same definition of "fun."
        -- Dave Barry


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

Date: 16 Jun 2005 16:52:00 GMT
From: Christopher Nehren <apeiron+usenet@coitusmentis.info>
Subject: Re: File-Find and Samba share
Message-Id: <slrndb3bhg.2l9j.apeiron+usenet@prophecy.dyndns.org>

On 2005-06-16, tlviewer scribbled these
curious markings:
> my $wdir = '//CompName/EBooks/CHM/perl/';
> find( {wanted => \&CheckCHM}, $wdir ); 
>
> In WinNT 5, the above code works. The UNC path is
> seemless. However in SuSE 9.2 Linux, the find() call
> returns a 
>         Can't stat //CompName/EBooks/CHM/perl: No such file or directory
>  at /windows/h/temp/earl/scripts/earl_populate.pl line 129

The error message is your guide. It's telling you that it can't stat
that file or directory. Is that the path you'd use to access the
filesystem using command-line tools like ls? On its own, Perl doesn't
know anything about Samba.

> thanks in advance,

You're welcome. Contrary to what one particular poster believes, saying
"TIA" is not rude or anything silly like that.

Best Regards,
Christopher Nehren
-- 
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong people questions, you get "Joel on Software".
Unix is user friendly. However, it isn't idiot friendly.


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

Date: Thu, 16 Jun 2005 14:54:57 +0100
From: Henry Law <lawshouse.public@btconnect.com>
Subject: Re: Module to match file names against a wildcard spec?
Message-Id: <bk03b153151dceh0ibomqse1akdf5plo53@4ax.com>

On 16 Jun 2005 09:48:30 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:

>However, since everything you want to include or exclude are actual
>files in a file system (right?), 

Indeed.  Just files or complete sub-directories.

>you don't have to do that, you can
>use Perl's glob() function together with File::Find.  Here's a sketch:
>
>    use File::Find;
>
>    my $dir = 'c:\foo';
>    my $exclude = 'C:\foo\*.txt'
>    @exclude{ glob( $exclude)} = ();

Uuh ... this is where I feel like the sorcerer's apprentice: totally
out of my depth.  There are Perl constructs here that I simply don't
recognise:

   @exclude{ glob( $exclude)} = ();
   ^       ^                    ^
   |       |                    |
   | 1. why don't we have to declare "@exclude" with "my"?
           |                    |
           | 2. That looks like a hash but "@exclude" is an array; or
           |    is this some kind of subroutine?  Surely not ...
                                |
                                | 3. Empty list ... but why, and where
                                |    is it going to?

If you could help me by pointing out the perldoc references where this
seam of witchcraft is described I'll go and read up!

The rest of your post - the part dealing with File::Find - I do
understand.  Thanks in the mean time.
-- 

Henry Law       <><     Manchester, England 


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

Date: Thu, 16 Jun 2005 14:25:30 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Module to match file names against a wildcard spec?
Message-Id: <Xns96776A0C2C771asu1cornelledu@127.0.0.1>

Henry Law <lawshouse.public@btconnect.com> wrote in 
news:bk03b153151dceh0ibomqse1akdf5plo53@4ax.com:

> On 16 Jun 2005 09:48:30 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
> Siegel) wrote:

>>    my $exclude = 'C:\foo\*.txt'
>>    @exclude{ glob( $exclude)} = ();
> 
> Uuh ... this is where I feel like the sorcerer's apprentice: totally
> out of my depth.  There are Perl constructs here that I simply don't
> recognise:
> 
>    @exclude{ glob( $exclude)} = ();
>    ^       ^                    ^
>   |       |                    |
>   | 1. why don't we have to declare "@exclude" with "my"?
>            |                    |
>            | 2. That looks like a hash but "@exclude" is an array; or
>            |    is this some kind of subroutine?  Surely not ...
>                                 |
>                                 | 3. Empty list ... but why, and where
>                                 |    is it going to?
> 
> If you could help me by pointing out the perldoc references where this
> seam of witchcraft is described I'll go and read up!

perldoc perldata

Read the section on slices.

If Anno had specified 

use strict;

he would have had to have:

my %exclude;

before the assignment to the slice.

Sinan
-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: Thu, 16 Jun 2005 14:27:39 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Module to match file names against a wildcard spec?
Message-Id: <Xns96776A69273DDasu1cornelledu@127.0.0.1>

"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in 
news:Xns96776A0C2C771asu1cornelledu@127.0.0.1:

> If Anno had specified 
> 
> use strict;

And so he did, in <d8ri2k$nif$2@mamenchi.zrz.TU-Berlin.DE>.

Sorry, I had not seen that one.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: 16 Jun 2005 17:42:02 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Module to match file names against a wildcard spec?
Message-Id: <d8sdla$bj6$1@mamenchi.zrz.TU-Berlin.DE>

A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in 
> news:Xns96776A0C2C771asu1cornelledu@127.0.0.1:
> 
> > If Anno had specified 
> > 
> > use strict;
> 
> And so he did, in <d8ri2k$nif$2@mamenchi.zrz.TU-Berlin.DE>.
> 
> Sorry, I had not seen that one.

Yes, the declaration was meant to be there, it got lost in a copy/paste
operation.  I corrected that fast, but not fast enough for modern Usenet,
it seems.

It used to be I could safely send a "supersede" within 5 minutes or so
and still catch it on my server most of the time.  These days, more
uncorrected postings seem to escape, something must be spinning faster.
I'll adjust my discipline and add a note to superseding postings that
marks them as such.

Anno


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

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


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