[32784] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4048 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 3 11:09:27 2013

Date: Thu, 3 Oct 2013 08:09: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           Thu, 3 Oct 2013     Volume: 11 Number: 4048

Today's topics:
    Re: openCV - cpan/Cv <rweikusat@mobileactivedefense.com>
    Re: openCV - cpan/Cv <netnews@invalid.com>
    Re: openCV - cpan/Cv <rweikusat@mobileactivedefense.com>
        Opening a file with its Windows app in Activestate <bernie@fantasyfarm.com>
    Re: Opening a file with its Windows app in Activestate <jurgenex@hotmail.com>
    Re: Opening a file with its Windows app in Activestate <ben@morrow.me.uk>
    Re: Opening a file with its Windows app in Activestate <jurgenex@hotmail.com>
    Re: Opening a file with its Windows app in Activestate <derykus@gmail.com>
    Re: Opening a file with its Windows app in Activestate <ben@morrow.me.uk>
    Re: perl hash utilities <cal@example.invalid>
    Re: perl hash utilities <cal@example.invalid>
    Re: perl hash utilities <ben@morrow.me.uk>
    Re: perl hash utilities <gravitalsun@hotmail.foo>
    Re: perl hash utilities <Cal@example.invalid>
    Re: perl hash utilities <nospam.gravitalsun.noadsplease@hotmail.noads.com>
    Re: perl hash utilities <rvtol+usenet@xs4all.nl>
    Re: perl hash utilities <bill@todbe.com>
    Re: perl hash utilities <nospam.gravitalsun.noadsplease@hotmail.noads.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 01 Oct 2013 12:18:05 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: openCV - cpan/Cv
Message-Id: <87a9it1bpu.fsf@sable.mobileactivedefense.com>

HASM <netnews@invalid.com> writes:
> Trying to use openCV from Perl, there's a cpan module called Cv that seems
> to be the only current recourse, however that module doesn't install
> properly through cpan.
>
> After manually installing ExtUtils::PkgConfig, a dependency the installer
> doesn't ask for, the build still fails with some errors, the first being
> that "macro seed is called with an argument when it expects zero"
>
> Google gets a couple of hits, pointing the finger at perl?
>   http://www.nntp.perl.org/group/perl.perl5.porters/2010/04/msg158573.html
>   https://github.com/Leont/libperl--/issues/5

Provided it isn't used in the module, just adding an

#undef seed

after the perl.h include and before the C++ 'random header' is included
should work.


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

Date: Tue, 01 Oct 2013 07:05:54 -0700
From: HASM <netnews@invalid.com>
Subject: Re: openCV - cpan/Cv
Message-Id: <87k3hxhyrh.fsf@127.0.0.1>

Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:

>> the build still fails with some errors, the first being
>> that "macro seed is called with an argument when it expects zero"

> Provided it isn't used in the module, just adding an
>
> #undef seed
>
> after the perl.h include and before the C++ 'random header' is included
> should work.

I had tried that already, but I guess I put it in the wrong place.  It now
generates tons of warnings but compiles, most of tests in make test pass,
but some (not all) seem to be openCV configuration related.

I only need a limited subset of openCV functionality, maybe that will work
before I need to dig through the warning list and/or make all tests succeed.

-- HASM




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

Date: Wed, 02 Oct 2013 13:26:59 +0100
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: openCV - cpan/Cv
Message-Id: <87r4c3n9ik.fsf@sable.mobileactivedefense.com>

HASM <netnews@invalid.com> writes:
> Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
>
>>> the build still fails with some errors, the first being
>>> that "macro seed is called with an argument when it expects zero"
>
>> Provided it isn't used in the module, just adding an
>>
>> #undef seed
>>
>> after the perl.h include and before the C++ 'random header' is included
>> should work.
>
> I had tried that already, but I guess I put it in the wrong place.

First, you should determine if the Perl seed is used in the module
code. That shouldn't be too difficult with the help of grep. If it
isn't, you could put the #undef immediately after the perl.h include
statement. If it is used, you need to replace the seed macro invocations
with the macro expansion. That's just a single function call so
shouldn't be too difficult, either.


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

Date: Wed, 02 Oct 2013 20:30:27 -0400
From: Bernie Cosell <bernie@fantasyfarm.com>
Subject: Opening a file with its Windows app in Activestate
Message-Id: <ofep49pth8o162j0i0li7c0ovnkqqokndk@library.airnews.net>

I've got Activestate Perl on my win7/pro system.  I've poked through the
win32 man pages and I just can't quite figure it out: I'm guessing there
must be some easy way for my perl program to tell windows "open <FILE.PDF>"
and have the PDF app open the file [and presumably some way I can wait
until it exits], or to explicitly say what program, like "OPEN <FILE> with
<EXCEL>"  Any pointers to what to look at in the docs would be appreciated.
THANKS!.

  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Wed, 02 Oct 2013 17:46:46 -0700
From: Jrgen Exner <jurgenex@hotmail.com>
Subject: Re: Opening a file with its Windows app in Activestate
Message-Id: <ibfp495d1vo7kavms0iedujrt1p2pkgo3r@4ax.com>

Bernie Cosell <bernie@fantasyfarm.com> wrote:
>I've got Activestate Perl on my win7/pro system.  I've poked through the
>win32 man pages and I just can't quite figure it out: I'm guessing there
>must be some easy way for my perl program to tell windows "open <FILE.PDF>"
>and have the PDF app open the file [and presumably some way I can wait
>until it exits], or to explicitly say what program, like "OPEN <FILE> with
><EXCEL>"  Any pointers to what to look at in the docs would be appreciated.

I suppose you could dig through some Windows API somewhere to find out
which program is configured to open which file type. But why not let
Windows do the heavy lifting? A simple
	system ('file.pdf');
will do the job nicely. 

Please note that very often Windows programs will run in a forked
process, i.e. system() will return immediately and the application
program will run independantly in a separate process. 

jue


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

Date: Thu, 3 Oct 2013 02:12:27 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Opening a file with its Windows app in Activestate
Message-Id: <rssuha-ehg.ln1@anubis.morrow.me.uk>


Quoth Jrgen Exner <jurgenex@hotmail.com>:
> Bernie Cosell <bernie@fantasyfarm.com> wrote:
> >I've got Activestate Perl on my win7/pro system.  I've poked through the
> >win32 man pages and I just can't quite figure it out: I'm guessing there
> >must be some easy way for my perl program to tell windows "open <FILE.PDF>"
> >and have the PDF app open the file [and presumably some way I can wait
> >until it exits], or to explicitly say what program, like "OPEN <FILE> with
> ><EXCEL>"  Any pointers to what to look at in the docs would be appreciated.

The only easy way to open a file with a specific program is to locate
the .exe and pass it the right arguments to get it to open the file.
*Usually* invoking (e.g.)

    c:\path\to\excel.exe c:\path\to\some.xls

is sufficient, but not always. (Remember to be careful about quoting.)
You may need to (locate and) read the documentation for the program
you're invoking.

As Jue says, there are Windows APIs for this sort of thing, and it is
always possible to go in that way. For instance, when it comes to Office
applications (and other apps that play nicely with OLE), you can use
Win32::OLE to get Excel to open the file without having to find out
where Excel is installed.

> I suppose you could dig through some Windows API somewhere to find out
> which program is configured to open which file type. But why not let
> Windows do the heavy lifting? A simple
> 	system ('file.pdf');
> will do the job nicely. 

Are you sure? I would be surprised. IIRC from the command-line you have
to run

    start file.pdf

and it won't wait. (In general it can't wait, because the file might be
passed to an already-running instance of the appropriate program.)

> Please note that very often Windows programs will run in a forked
> process,

Forked? :)

> i.e. system() will return immediately and the application
> program will run independantly in a separate process. 

This is almost never the case if you invoke an application directly;
however, if you invoke it through 'start' then I believe start.exe will
just contact a running Explorer process to perform the file open, and
will exit as soon as it's done that.

Ben



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

Date: Wed, 02 Oct 2013 18:42:58 -0700
From: Jrgen Exner <jurgenex@hotmail.com>
Subject: Re: Opening a file with its Windows app in Activestate
Message-Id: <d6ip495p2epiebo0i303tbo960vli30l8k@4ax.com>

Ben Morrow <ben@morrow.me.uk> wrote:
>Quoth J?Exner <jurgenex@hotmail.com>:
>> Windows do the heavy lifting? A simple
>> 	system ('file.pdf');
>> will do the job nicely. 
>
>Are you sure? 

Yes. I tried it before I posted the reply.
Of course *.PDF has to be associated with the proper program.

>I would be surprised. IIRC from the command-line you have
>to run
>    start file.pdf

Correct. Maybe some system() magic on Windows?

>and it won't wait. (In general it can't wait, because the file might be
>passed to an already-running instance of the appropriate program.)

Agreed again.

>> Please note that very often Windows programs will run in a forked
>> process,
>
>Forked? :)
>
>> i.e. system() will return immediately and the application
>> program will run independantly in a separate process. 
>
>This is almost never the case if you invoke an application directly;

Just try a simple
	notepad
from a DOS command prompt, without a preceeding 'start'.

>however, if you invoke it through 'start' then I believe start.exe will
>just contact a running Explorer process to perform the file open, and
>will exit as soon as it's done that.

Maybe that's the mechanics behind the scene. And yes, when called with
'start', then this adds an additional layer and even the few programs
that normally would cause system() to wait will now run in parallel.
The important point from a Perl programmers point of view is that for
many Windows program system() will not wait for them to finish, even
when not using 'start' but calling the exe directly. 

Been there, done that. At the end for this particularly nasty program
the only somewhat reliable way to determine if it was still running was
to check the process table in regular intervals.

jue



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

Date: Thu, 03 Oct 2013 02:34:50 -0700
From: Charles DeRykus <derykus@gmail.com>
Subject: Re: Opening a file with its Windows app in Activestate
Message-Id: <l2jdnv$eut$1@speranza.aioe.org>

On 10/2/2013 6:12 PM, Ben Morrow wrote:
>
> Quoth J�rgen Exner <jurgenex@hotmail.com>:
>> Bernie Cosell <bernie@fantasyfarm.com> wrote:
>> ...
>
>> I suppose you could dig through some Windows API somewhere to find out
>> which program is configured to open which file type. But why not let
>> Windows do the heavy lifting? A simple
>> 	system ('file.pdf');
>> will do the job nicely.
>
> Are you sure? I would be surprised. IIRC from the command-line you have
> to run
>
>      start file.pdf
>
> and it won't wait. (In general it can't wait, because the file might be
> passed to an already-running instance of the appropriate program.)
>

Running this twice:   perl -e "0==system('foo.pdf') or die $?"

The first waits and the second doesn't.  However, in both cases, the 
wait call will return 256 even exiting Adobe normally.

Peek behind those dark doors at your own peril...

-- 
Charles DeRykus



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

Date: Thu, 3 Oct 2013 15:11:40 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Opening a file with its Windows app in Activestate
Message-Id: <sha0ia-boj2.ln1@anubis.morrow.me.uk>


Quoth Jrgen Exner <jurgenex@hotmail.com>:
> Ben Morrow <ben@morrow.me.uk> wrote:
> >Quoth J?Exner <jurgenex@hotmail.com>:
> >> Windows do the heavy lifting? A simple
> >> 	system ('file.pdf');
> >> will do the job nicely. 
> >
> >Are you sure? 
> 
> Yes. I tried it before I posted the reply.
> Of course *.PDF has to be associated with the proper program.
> 
> >I would be surprised. IIRC from the command-line you have
> >to run
> >    start file.pdf
> 
> Correct. Maybe some system() magic on Windows?

Huh. I didn't know that. I don't think this is anything perl is doing:
it just passes the given command-line to CreateProcess, and if that
fails it tries again prepending 'cmd.exe /x/d/c'. This must be a cmd
'feature', I think; perhaps a new one. IIRC it used to be necessary to
put the extension into some environment variable before you could invoke
it directly.

> >and it won't wait. (In general it can't wait, because the file might be
> >passed to an already-running instance of the appropriate program.)
> 
> Agreed again.
> 
> >> Please note that very often Windows programs will run in a forked
> >> process,
> >
> >Forked? :)
> >
> >> i.e. system() will return immediately and the application
> >> program will run independantly in a separate process. 
> >
> >This is almost never the case if you invoke an application directly;
> 
> Just try a simple
> 	notepad
> from a DOS command prompt, without a preceeding 'start'.

Hmm. It's been a while since I've done any serious work on Windows; I
don't remember this behaviour. In any case it can't be the application
that's forking, since Windows processes don't fork; this must again be a
cmd.exe thing. If perl creates the process directly (i.e. if the
invocation without cmd.exe succeeds) it will wait for it to exit.

> >however, if you invoke it through 'start' then I believe start.exe will
> >just contact a running Explorer process to perform the file open, and
> >will exit as soon as it's done that.
> 
> Maybe that's the mechanics behind the scene. And yes, when called with
> 'start', then this adds an additional layer and even the few programs
> that normally would cause system() to wait will now run in parallel.
> The important point from a Perl programmers point of view is that for
> many Windows program system() will not wait for them to finish, even
> when not using 'start' but calling the exe directly. 
> 
> Been there, done that. At the end for this particularly nasty program
> the only somewhat reliable way to determine if it was still running was
> to check the process table in regular intervals.

IME the only even-remotely reliable way to invoke real Windows programs
(rather than ported Unix programs, which tend to behave a little
differently) is to use Win32::Process directly. The Create call will
always return immediately, but you can then call ->Wait to wait for it
to terminate. (Obviously if you used 'start' this still won't get you
anywhere.)

Ben



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

Date: Tue, 01 Oct 2013 13:49:27 -0700
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: perl hash utilities
Message-Id: <GbudnfqUrf3AqNbPnZ2dnUVZ_qidnZ2d@supernews.com>

On 09/27/2013 02:55 PM, J. Gleixner wrote:

> What's creating ident1.txt???.. Why does it have to be in that format????

Changing the format of this has been the bulk of this task.  This is the 
current form of ident1.txt.

$ pwd
/home/fred/Documents/root/pages/portabello/template_stuff
$ cat ident1.txt
my %config = {
      my_ftp =  {
            domain   =>  'fakename',
            username =>  'fakeuser',
            password =>  'fakepass',
           },

     yoursky = {
            domain   =>  'http://www.fourmilab.ch/yoursky/',
            language =>  'russian',
            word =>  'north',
           },
}

$

The change here is that this is more-explicitly perl with the addition of

my %config

but then, whilst figuring out how to include that, found that perl won't 
let you include so innocently without making it a rather obvious kludge.

Now, I don't use a text identity file at all: I use a perl module, the 
first of my own authorship.
>
> It seems that you are complicating things and wasting a lot of time
> by coming up with your own format and then trying to shoehorn that
> format into something usable.

I finally have something usable:

$ perl config6.pl
subroutine says this is your hash:
yoursky: domain=http://www.fourmilab.ch/yoursky/ word=north 
language=russian
my_ftp: password=fakepass domain=fakename username=fakeuser
$VAR1 = [
           {
             'yoursky' => {
                            'domain' => 'http://www.fourmilab.ch/yoursky/',
                            'word' => 'north',
                            'language' => 'russian'
                          },
             'my_ftp' => {
                           'password' => 'fakepass',
                           'domain' => 'fakename',
                           'username' => 'fakeuser'
                         }
           }
         ];
>
> Go the other way.. Change the format to something that is expected --
> well defined. There's JSON, YAML, Data::Dumper's Freeze/Thaw, XML, etc.

I did go another way.  Ladies and gentlemen, behold Config1.pm:

$ cat Config1.pm
#!/usr/bin/perl -w
package Config1;
require Exporter;

our @ISA = qw(Exporter);
our @EXPORT = qw(%config);

my %config = (
      my_ftp =>  {
            domain   =>  'fakename',
            username =>  'fakeuser',
            password =>  'fakepass',
           },

     yoursky => {
            domain   =>  'http://www.fourmilab.ch/yoursky/',
            language =>  'russian',
            word =>  'north',
           },
);




$

Don't clap, just throw money.  (jk)
>
> Pick one and try it. Each one already has classes/methods to create data
> structures out of the data.  This will turn into a 5-minute task.
>

It took a week writing it, but now it's done for good:

$ cat config6.pl
#!/usr/bin/perl -w
use strict;
use FindBin;
#use lib "$FindBin::Bin/template_stuff";
use lib "template_stuff";
use Config1 qw(%config);
use Data::Dumper;


print_hoh(\%Config1::config);
print Dumper [\%Config1::config];

sub print_hoh{
    print "subroutine says this is your hash: \n";
    my $hash_ref = shift;
    my %hash = %$hash_ref;
    for my $family (keys %hash ) {
       print "$family: ";
       for my $role ( keys %{ $hash{$family} } ) {
          print "$role=$hash{$family}{$role} ";
       }
    print "\n";
    }
}


$

Thanks all for comments.  Juergen, you were talking elsethread about the 
virtues of using FindBin.  I believe I am safe with the inclusion of 
this module, given that the module is always in a child directory named 
template_stuff.  In some sense, template_stuff is root for the template.

I don't want to have to come back and look at how to do precisely this 
14 years from now without having given the matter a little discussion.
-- 
Cal Dershowitz*

*author of a perl module


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

Date: Wed, 02 Oct 2013 09:59:36 -0700
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: perl hash utilities
Message-Id: <zJudnXfpmfhpzdHPnZ2dnUVZ_hGdnZ2d@supernews.com>

On 09/27/2013 02:42 PM, Ben Morrow wrote:
>
> Quoth Cal Dershowitz <cal@example.invalid>:
>>
>> I see Ben.  We've all defined arrays in main and passed them to a
>> subroutine and had that subroutine hand it back with new values.
>
> No we haven't. That's very poor practice.
>
>> Could a person return a reference to the hash to make the data not blink
>> out of scope at just the wrong time?
>
> Yes. You can also pass a reference to a hash, and modify that hash (via
> the reference) in the sub. In both cases (more so in the first) it's
> clear that the sub is or may be responsible for the values that end up
> in the hash.

and as long as the $ref itself or a copy of $ref exists, the data is 
available.  If the references go undefined then all bets are off.  I'm 
not sure if I understood that section of the alpaca book.
-- 
Cal



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

Date: Wed, 2 Oct 2013 20:58:08 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: perl hash utilities
Message-Id: <gfauha-7ja.ln1@anubis.morrow.me.uk>


Quoth Cal Dershowitz <cal@example.invalid>:
> 
> and as long as the $ref itself or a copy of $ref exists, the data is 
> available.  If the references go undefined then all bets are off.  I'm 
> not sure if I understood that section of the alpaca book.

It's very simple (or at least, it's very simple as long as you don't
involve circular or weak refs). A data structure continues to exist for
as long as someone can get to it. As soon as it becomes completely
invisible, it self-destructs. So:

    my $x = [1, 2, 3];  # $x holds a ref to an array.
    my $y = $x;         # $y holds a ref to the same array.
    $x = 0;             # The array is still visible through $y.
    $y = 0;             # The array self-destructs here, because noone
                        # can see it any more.

    {
        my $x = [1, 2, 3];  # $x holds a ref to an array.
    }                       # $x goes out of scope here, so $x
                            # disappears, so noone can see the array any
                            # more either, so that disappears too.

    sub foo {
        my $x = [1, 2, 3];  # $x holds a ref to an array.
        return $x;          # The ref is copied onto the sub's return
                            # list.
    }                       # $x goes out of scope here, but the array
                            # is still visible via the sub's return
                            # list, so the array still exists.
    my $y = foo();          # The ref on the sub's return list is copied
                            # into $y, so the array is still visible.
    $y = 0;                 # The array self-destructs here, because
                            # noone can see it any more.
            
Ben



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

Date: Thu, 03 Oct 2013 00:46:57 +0300
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: perl hash utilities
Message-Id: <l2i48h$28va$1@news.ntua.gr>

> I finally have something usable:


#!/usr/bin/perl
use strict;
use warnings;
use Config1;


foreach my $family (keys %config)
{
print "$family:\n";

	foreach my $role (keys %{$config{$family}})
	{
  	print "\t$role=$config{$family}->{$role}\n"
	}
}






Config1.pm :



package Config1;
require Exporter;

our @ISA = qw(Exporter);
our @EXPORT = '%config';


our %config = (
      my_ftp =>  {
            domain   =>  'fakename',
            username =>  'fakeuser',
            password =>  'fakepass',
           },

     yoursky => {
            domain   =>  'http://www.fourmilab.ch/yoursky/',
            language =>  'russian',
            word =>  'north',
           },
);



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

Date: Wed, 02 Oct 2013 19:34:14 -0700
From: Cal Dershowitz <Cal@example.invalid>
Subject: Re: perl hash utilities
Message-Id: <BtWdneYvOOEHStHPnZ2dnUVZ_vadnZ2d@supernews.com>

On 10/2/2013 2:46 PM, George Mpouras wrote:

>
>
> Config1.pm :
>
>
>
> package Config1;
> require Exporter;
>
> our @ISA = qw(Exporter);
> our @EXPORT = '%config';

Why would you single-quote @EXPORT and not use the qw syntax like @ISA?

I read a lot of this today but didn't stumble yet on an explanation of 
what @ISA is. (?)
-- 
Cal


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

Date: Thu, 03 Oct 2013 11:55:39 +0300
From: George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com>
Subject: Re: perl hash utilities
Message-Id: <l2jbd2$8ff$1@news.ntua.gr>

Στις 3/10/2013 05:34, ο/η Cal Dershowitz έγραψε:
> On 10/2/2013 2:46 PM, George Mpouras wrote:
>
>>
>>
>> Config1.pm :
>>
>>
>>
>> package Config1;
>> require Exporter;
>>
>> our @ISA = qw(Exporter);
>> our @EXPORT = '%config';
>
> Why would you single-quote @EXPORT and not use the qw syntax like @ISA?
>
> I read a lot of this today but didn't stumble yet on an explanation of
> what @ISA is. (?)


@array = qw/a b/;

is the same as

@array = 'a' , 'b';


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

Date: Thu, 03 Oct 2013 11:11:34 +0200
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
To: George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com>
Subject: Re: perl hash utilities
Message-Id: <524D34C6.5020905@xs4all.nl>

On 03/10/2013 10:55, George Mpouras wrote:

> @array = qw/a b/;
>
> is the same as
>
> @array = 'a' , 'b';

perl -MData::Dumper -e'

   my @array = "a", "b";

   print Dumper( \@array );
'
$VAR1 = [
           'a'
         ];

-- 
Ruud



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

Date: Thu, 03 Oct 2013 02:30:39 -0700
From: "$Bill" <bill@todbe.com>
Subject: Re: perl hash utilities
Message-Id: <l2jdfu$ug2$1@dont-email.me>

On 10/2/2013 19:34, Cal Dershowitz wrote:
> On 10/2/2013 2:46 PM, George Mpouras wrote:
>
>>
>>
>> Config1.pm :
>>
>>
>>
>> package Config1;
>> require Exporter;
>>
>> our @ISA = qw(Exporter);
>> our @EXPORT = '%config';
>
> Why would you single-quote @EXPORT and not use the qw syntax like @ISA?

6 of these - half dozen of the other - they're equivalent in this case.
qw is just a space separated bunch of ''s (uninterpolated strings).

> I read a lot of this today but didn't stumble yet on an explanation of what @ISA is. (?)

If you combine all of the base Perl man pages into a single
text file, you can easily search for something like @ISA.

Stands for 'is a' - defines an inheritance tree for the package
in question.  See perlboot - OO tutorial.

Email me a legit addy and I'll send you a script to combine
your pods for you.

[Note: Not all of my posts seem to make it through using these
flaky free servers - let's hope this does.]



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

Date: Thu, 03 Oct 2013 13:24:20 +0300
From: George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com>
Subject: Re: perl hash utilities
Message-Id: <l2jgjb$n72$1@news.ntua.gr>

Στις 3/10/2013 12:11, ο/η Dr.Ruud έγραψε:
> On 03/10/2013 10:55, George Mpouras wrote:
>
>> @array = qw/a b/;
>>
>> is the same as
>>
>> @array = 'a' , 'b';
>
> perl -MData::Dumper -e'
>
>    my @array = "a", "b";
>
>    print Dumper( \@array );
> '
> $VAR1 = [
>            'a'
>          ];
>

tippo !

my @array = ( "a", "b" );


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

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:

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

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#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 V11 Issue 4048
***************************************


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