[22793] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5014 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 20 18:05:54 2003

Date: Tue, 20 May 2003 15:05:14 -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           Tue, 20 May 2003     Volume: 10 Number: 5014

Today's topics:
    Re: advice re perl modules <maxw@sgi.com>
    Re: advice re perl modules <bjm-nntp@vsca.ca>
    Re: advice re perl modules <mbudash@sonic.net>
    Re: advice re perl modules <maxw@sgi.com>
    Re: advice re perl modules <bjm-nntp@vsca.ca>
    Re: advice re perl modules (Tad McClellan)
    Re: advice re perl modules <maxw@sgi.com>
    Re: advice re perl modules <maxw@sgi.com>
    Re: advice re perl modules <maxw@sgi.com>
    Re: Close html page <mbudash@sonic.net>
    Re: Close html page <steve@uptime.orgNo.ukSpam>
    Re: Close html page <bjm-nntp@vsca.ca>
    Re: Close html page <steve@uptime.orgNo.ukSpam>
    Re: Close html page <flavell@mail.cern.ch>
        help selecting and displaying specific files after read <spamReallySucks@forgetit.com>
    Re: help selecting and displaying specific files after  <tassilo.parseval@rwth-aachen.de>
    Re: help selecting and displaying specific files after  <spamReallySucks@forgetit.com>
        How can I get stats about how many time is a program in (i5513)
    Re: How can I get stats about how many time is a progra <tassilo.parseval@rwth-aachen.de>
    Re: mark-symlinked-directories <robert@inphact.com>
    Re: mark-symlinked-directories (Anno Siegel)
    Re: Perl: Regex help request (Tad McClellan)
        Problem with regular expression evaluation from perl 5. <nospam.gregory.deal@unisys.com>
    Re: Problem with regular expression evaluation from per (Tad McClellan)
    Re: why key is added to hash after defined ? <mpapec@yahoo.com>
        YaBB forum <robertdelaney@blueyonder.co.uk>
    Re: YaBB forum <cwilbur@mithril.chromatico.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 20 May 2003 11:07:25 -0700
From: Max Waterman <maxw@sgi.com>
Subject: Re: advice re perl modules
Message-Id: <badquj$1l18qg$1@fido.engr.sgi.com>

Noone seems to want to answer this question.

Is it an FAQ, or is there a better place to ask the question?

Max.

Max Waterman wrote:

> Hi,
> 
> I have developed a perl application on one machine which has perl v5.6.1,
> and I have used CPAN.pm to install the require modules.
> 
> I now need to install the application on another machine which has either
> perl 5.004_05 or 5.004_02, but is missing a fair number of the perl
> modules my application needs.
> 
> I can install perl modules, but I should not update any that are already
> installed since other applications rely on them.
> 
> I would like to be able to create a self contained application so that it
> doesn't break when someone changes the machine's perl installation. I
> guess this is the same as if I had no root privs at all.
> 
> Can someone tell me how I can do this?
> 
> If it were a binary application, I would use 'ldd' and 'rld' to locate
> the libs the app uses, and copy them into a local directory, etc etc. Not
> sure even how to find out what the full path of a perl module my app
> 'use's let alone make sure the app uses local ones.
> 
> Thanks.
> 
> Max.
> 
> 



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

Date: Tue, 20 May 2003 18:18:18 GMT
From: Brad Murray <bjm-nntp@vsca.ca>
Subject: Re: advice re perl modules
Message-Id: <Kjuya.9557$s14.3561446@news0.telusplanet.net>

Max Waterman <maxw@sgi.com> wrote:
MW> Noone seems to want to answer this question.

Go to http://www.activestate.com and buy their perlexe product.  This
will allwo you to encapsulate all dependencies into one executable
that will not be reliant on external (and possibly changing) factors.

-- 
Brad Murray    *   The trouble with troubleshooting is that trouble
VSCA Founder   *   sometimes shoots back -- <Rejo>



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

Date: Tue, 20 May 2003 18:20:44 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: advice re perl modules
Message-Id: <mbudash-600626.11204320052003@typhoon.sonic.net>

In article <badquj$1l18qg$1@fido.engr.sgi.com>,
 Max Waterman <maxw@sgi.com> wrote:

> Max Waterman wrote:
> 
> > Hi,
> > 
> > I have developed a perl application on one machine which has perl v5.6.1,
> > and I have used CPAN.pm to install the require modules.
> > 
> > I now need to install the application on another machine which has either
> > perl 5.004_05 or 5.004_02, but is missing a fair number of the perl
> > modules my application needs.
> > 
> > I can install perl modules, but I should not update any that are already
> > installed since other applications rely on them.
> > 
> > I would like to be able to create a self contained application so that it
> > doesn't break when someone changes the machine's perl installation. I
> > guess this is the same as if I had no root privs at all.
> > 
> > Can someone tell me how I can do this?
> > 
> > If it were a binary application, I would use 'ldd' and 'rld' to locate
> > the libs the app uses, and copy them into a local directory, etc etc. Not
> > sure even how to find out what the full path of a perl module my app
> > 'use's let alone make sure the app uses local ones.
> > 
> > Thanks.
> > 
> > Max.
> > 
> > 
> 
>
> Noone seems to want to answer this question.
> 
> Is it an FAQ, or is there a better place to ask the question?
> 
> Max.
> 

do a local install of any modules needed:

perldoc -q "How do I keep my own module/library directory?"

then change the app to use those versions. (e.g., 'use lib')

hth-

-- 
Michael Budash


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

Date: Tue, 20 May 2003 11:29:16 -0700
From: Max Waterman <maxw@sgi.com>
Subject: Re: advice re perl modules
Message-Id: <bads7h$1l20v3$1@fido.engr.sgi.com>

Brad Murray wrote:
> Max Waterman <maxw@sgi.com> wrote:
> MW> Noone seems to want to answer this question.
> 
> Go to http://www.activestate.com and buy their perlexe product.  This
> will allwo you to encapsulate all dependencies into one executable
> that will not be reliant on external (and possibly changing) factors.

Do you mean their 'perlex' product :

"Improve Perl performance on Windows-based Web servers"

?

There's one problem with that - in a word 'Windows'. Won't work for me.

Thanks though.

I was looking more for how I can encapsulate the perl executable plus all 
the modules my script uses, all in one directory heirarchy....

Max.



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

Date: Tue, 20 May 2003 18:45:00 GMT
From: Brad Murray <bjm-nntp@vsca.ca>
Subject: Re: advice re perl modules
Message-Id: <MIuya.9562$s14.3575771@news0.telusplanet.net>

Max Waterman <maxw@sgi.com> wrote:
MW> Do you mean their 'perlex' product :
MW> 
MW> "Improve Perl performance on Windows-based Web servers"

Nope.  Looks like the renamed it and no longer sell it separately.
It's in the Perl dev kit as PerlApp:
http://www.activestate.com/Products/Perl_Dev_Kit/

MW> There's one problem with that - in a word 'Windows'. Won't work for me.

PerlApp is available for HP/UX, Linux, and Solaris as well as Windows.

MW> I was looking more for how I can encapsulate the perl executable plus all 
MW> the modules my script uses, all in one directory heirarchy....

Right, that's what PerlApp does, though all in one file.

-- 
Brad Murray    *   The trouble with troubleshooting is that trouble
VSCA Founder   *   sometimes shoots back -- <Rejo>



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

Date: Tue, 20 May 2003 15:21:01 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: advice re perl modules
Message-Id: <slrnbcl3hd.2r2.tadmc@magna.augustmail.com>

Max Waterman <maxw@sgi.com> wrote:

> Noone seems to want to answer this question.


   Date: Tue, 20 May 2003 09:26:31 -0700     OP
   Date: Tue, 20 May 2003 11:07:25 -0700     self followup


You have ambitious expectations regarding Usenet.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 20 May 2003 14:52:56 -0700
From: Max Waterman <maxw@sgi.com>
Subject: Re: advice re perl modules
Message-Id: <bae85m$1l2cs8$1@fido.engr.sgi.com>

OK, thanks.

Maybe I'll look into it if I can't get the other solution to work.

Thanks.

Max.

Brad Murray wrote:

> Max Waterman <maxw@sgi.com> wrote:
> MW> Do you mean their 'perlex' product :
> MW> 
> MW> "Improve Perl performance on Windows-based Web servers"
> 
> Nope.  Looks like the renamed it and no longer sell it separately.
> It's in the Perl dev kit as PerlApp:
> http://www.activestate.com/Products/Perl_Dev_Kit/
> 
> MW> There's one problem with that - in a word 'Windows'. Won't work for me.
> 
> PerlApp is available for HP/UX, Linux, and Solaris as well as Windows.
> 
> MW> I was looking more for how I can encapsulate the perl executable plus all 
> MW> the modules my script uses, all in one directory heirarchy....
> 
> Right, that's what PerlApp does, though all in one file.
> 



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

Date: Tue, 20 May 2003 14:53:21 -0700
From: Max Waterman <maxw@sgi.com>
Subject: Re: advice re perl modules
Message-Id: <bae86f$1l2cs8$2@fido.engr.sgi.com>

That sounds like just the thing...thanks!

Max.

Michael Budash wrote:

> In article <badquj$1l18qg$1@fido.engr.sgi.com>,
>  Max Waterman <maxw@sgi.com> wrote:
> 
> 
>>Max Waterman wrote:
>>
>>
>>>Hi,
>>>
>>>I have developed a perl application on one machine which has perl v5.6.1,
>>>and I have used CPAN.pm to install the require modules.
>>>
>>>I now need to install the application on another machine which has either
>>>perl 5.004_05 or 5.004_02, but is missing a fair number of the perl
>>>modules my application needs.
>>>
>>>I can install perl modules, but I should not update any that are already
>>>installed since other applications rely on them.
>>>
>>>I would like to be able to create a self contained application so that it
>>>doesn't break when someone changes the machine's perl installation. I
>>>guess this is the same as if I had no root privs at all.
>>>
>>>Can someone tell me how I can do this?
>>>
>>>If it were a binary application, I would use 'ldd' and 'rld' to locate
>>>the libs the app uses, and copy them into a local directory, etc etc. Not
>>>sure even how to find out what the full path of a perl module my app
>>>'use's let alone make sure the app uses local ones.
>>>
>>>Thanks.
>>>
>>>Max.
>>>
>>>
>>
>>
>>Noone seems to want to answer this question.
>>
>>Is it an FAQ, or is there a better place to ask the question?
>>
>>Max.
>>
> 
> 
> do a local install of any modules needed:
> 
> perldoc -q "How do I keep my own module/library directory?"
> 
> then change the app to use those versions. (e.g., 'use lib')
> 
> hth-
> 



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

Date: Tue, 20 May 2003 14:55:44 -0700
From: Max Waterman <maxw@sgi.com>
Subject: Re: advice re perl modules
Message-Id: <bae8au$1l2cs8$3@fido.engr.sgi.com>

Tad McClellan wrote:
> Max Waterman <maxw@sgi.com> wrote:
> 
> 
>>Noone seems to want to answer this question.
> 
> 
> 
>    Date: Tue, 20 May 2003 09:26:31 -0700     OP
>    Date: Tue, 20 May 2003 11:07:25 -0700     self followup
> 
> 
> You have ambitious expectations regarding Usenet.
> 

Indeed, it seems that way, though I posted to another news group and that 
was a day or so ago.

So, yes, you're right, but understand that this isn't the only place I've 
asked.

Thanks for the answers though. It will really help me out.

Max.



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

Date: Tue, 20 May 2003 18:03:33 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: Close html page
Message-Id: <mbudash-EBA6F1.11033220052003@typhoon.sonic.net>

In article <vckqfvmofm9k33@corp.supernews.com>,
 "Chris" <chris_12003@yahoo.com> wrote:

> I have the following in my code to begin my html page
> 
> print "Content-type: text/html\n";
> 
> Is there another statement I can use that'll close the page so that I can
> issue another print "Content..., actually I need to send a cookie header
> later in my code and it isn't working because the header was already sent.

you can't do that. once the headers are sent, they're sent. change your 
code to wait to complete the sending of the headers until you know 
whether you need a (i assume you meant) 'set-cookie' header or not.

hth-

-- 
Michael Budash


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

Date: Tue, 20 May 2003 19:14:55 +0100
From: Stephen Hildrey <steve@uptime.orgNo.ukSpam>
Subject: Re: Close html page
Message-Id: <1053454495.97185.0@doris.uk.clara.net>

In article <vckqfvmofm9k33@corp.supernews.com>, Chris wrote:
> I have the following in my code to begin my html page
> 
> print "Content-type: text/html\n";

Chances are, you want to be using \r\n for network-bound line endings.

Also, it's probably worth using the CGI module, for reasons discussed
in:

  http://www.perlmonks.org/index.pl?node=use%20CGI%20or%20die%3B

(Yeah it's big. Yeah it's not necessarily fast. But it's robust and
tends to Do What You Mean.)

Regards,
Steve


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

Date: Tue, 20 May 2003 18:27:33 GMT
From: Brad Murray <bjm-nntp@vsca.ca>
Subject: Re: Close html page
Message-Id: <psuya.9558$s14.3566662@news0.telusplanet.net>

Stephen Hildrey <steve@uptime.orgno.ukspam> wrote:
SH> Chances are, you want to be using \r\n for network-bound line endings.

More portably, construct a CRLF pair manually.  \n is not reliably a
LF (under some OS it will be CRLF and under still others it will be
CR).

-- 
Brad Murray    *   The trouble with troubleshooting is that trouble
VSCA Founder   *   sometimes shoots back -- <Rejo>



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

Date: Tue, 20 May 2003 19:30:35 +0100
From: Stephen Hildrey <steve@uptime.orgNo.ukSpam>
Subject: Re: Close html page
Message-Id: <1053455435.67991.0@dyke.uk.clara.net>

In article <psuya.9558$s14.3566662@news0.telusplanet.net>, Brad Murray wrote:
> Stephen Hildrey <steve@uptime.orgno.ukspam> wrote:
> SH> Chances are, you want to be using \r\n for network-bound line endings.
> 
> More portably, construct a CRLF pair manually.  \n is not reliably a
> LF (under some OS it will be CRLF and under still others it will be
> CR).

Good point.  Looking at the CGI.pm source, the ending defaults to
"\015\012".

Regards,
Steve


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

Date: Tue, 20 May 2003 21:08:12 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Close html page
Message-Id: <Pine.LNX.4.53.0305202059510.21127@lxplus002.cern.ch>

On Tue, May 20, Brad Murray inscribed on the eternal scroll:

> Stephen Hildrey <steve@uptime.orgno.ukspam> wrote:
> SH> Chances are, you want to be using \r\n for network-bound line endings.
>
> More portably, construct a CRLF pair manually.  \n is not reliably a
> LF (under some OS it will be CRLF and under still others it will be
> CR).

The posting which started this thread hasn't arrived here, but if in
fact it's a CGI question, as I suppose it to be, then your
well-intentioned but laborious attempts to create correct HTTP syntax
may be pointless, since the exercise is to create a CGI response, not
an HTTP network response.

$CRLF (\015\012 written in binary mode) is certainly a permissible
line end according to the CGI spec, I won't argue against that, but
the platform's own newline (i.e \n written in text mode) is a
perfectly respectable line end for a parsed-headers CGI script
response.  See < http://www.perldoc.com/perl5.8.0/pod/perlfaq9.html#
What-is-the-correct-form-of-response-from-a-CGI-script- > for details
and authoritative references.

best


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

Date: Tue, 20 May 2003 19:27:03 GMT
From: "Scaramouche" <spamReallySucks@forgetit.com>
Subject: help selecting and displaying specific files after reading directory:
Message-Id: <bkvya.214620$My6.3447198@twister.tampabay.rr.com>

using xp-pro and perl 5.6.1.
i'm opening and reading a directory with the hopes of selecting specific
files, those with *.tmp extension.  then i plan on using 'unlink' so as to
delete these files:

$currentDir = ".";
opendir(CURRENT_DIR, $currentDir) || die "can't opendir $currentDir: \n$!";
@filenames = readdir(CURRENT_DIR);
@allFiles = grep(/.tmp/ , @filenames);

closedir CURRENT_PB_DIR;
print("The following *.tmp files were found: @allFiles\n");

here's my question, although the above works, i cannot seem to display such
files one per line, even though i'm using \n within the print statement.
will i need a loop for that being that @allFiles is a list or array?
is there a more efficient way of doing this with perl?

i then plan to do something like:
unlink<@allFiles>;

i have not tested that part yet though.

thanks





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

Date: 20 May 2003 19:35:53 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: help selecting and displaying specific files after reading directory:
Message-Id: <bae02p$10p$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Scaramouche:

> using xp-pro and perl 5.6.1.
> i'm opening and reading a directory with the hopes of selecting specific
> files, those with *.tmp extension.  then i plan on using 'unlink' so as to
> delete these files:
> 
> $currentDir = ".";
> opendir(CURRENT_DIR, $currentDir) || die "can't opendir $currentDir: \n$!";
> @filenames = readdir(CURRENT_DIR);
> @allFiles = grep(/.tmp/ , @filenames);
> 
> closedir CURRENT_PB_DIR;
> print("The following *.tmp files were found: @allFiles\n");
> 
> here's my question, although the above works, i cannot seem to display such
> files one per line, even though i'm using \n within the print statement.
> will i need a loop for that being that @allFiles is a list or array?

That's because your print statement is equivalent to

    print "The following *.tmp files were found: ",
          join ($", @allFiles), "\n";

$" is by default a space (see 'perldoc perlvar / $LIST_SEPARATOR'). To
print them linewise, join with "\n":

    print join "\n", @allFiles;

> is there a more efficient way of doing this with perl?
> 
> i then plan to do something like:
> unlink<@allFiles>;

This is indeed possible:

    unlink <$currentDir/*.tmp>;

In this case, <> is the glob operator. Could also be written as

    unlink glob "$currentDir/*.tmp";
    
Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Tue, 20 May 2003 19:58:08 GMT
From: "Scaramouche" <spamReallySucks@forgetit.com>
Subject: Re: help selecting and displaying specific files after reading directory:
Message-Id: <kNvya.214630$My6.3450166@twister.tampabay.rr.com>

thank you,
for taking the time to read my post, and for answering my questions.

"Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message
news:bae02p$10p$1@nets3.rz.RWTH-Aachen.DE...
> Also sprach Scaramouche:
>
> > using xp-pro and perl 5.6.1.
> > i'm opening and reading a directory with the hopes of selecting specific
> > files, those with *.tmp extension.  then i plan on using 'unlink' so as
to
> > delete these files:
> >
> > $currentDir = ".";
> > opendir(CURRENT_DIR, $currentDir) || die "can't opendir $currentDir:
\n$!";
> > @filenames = readdir(CURRENT_DIR);
> > @allFiles = grep(/.tmp/ , @filenames);
> >
> > closedir CURRENT_PB_DIR;
> > print("The following *.tmp files were found: @allFiles\n");
> >
> > here's my question, although the above works, i cannot seem to display
such
> > files one per line, even though i'm using \n within the print statement.
> > will i need a loop for that being that @allFiles is a list or array?
>
> That's because your print statement is equivalent to
>
>     print "The following *.tmp files were found: ",
>           join ($", @allFiles), "\n";
>
> $" is by default a space (see 'perldoc perlvar / $LIST_SEPARATOR'). To
> print them linewise, join with "\n":
>
>     print join "\n", @allFiles;
>
> > is there a more efficient way of doing this with perl?
> >
> > i then plan to do something like:
> > unlink<@allFiles>;
>
> This is indeed possible:
>
>     unlink <$currentDir/*.tmp>;
>
> In this case, <> is the glob operator. Could also be written as
>
>     unlink glob "$currentDir/*.tmp";
>
> Tassilo
> -- 
>
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
>
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
>
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
>




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

Date: 20 May 2003 11:57:58 -0700
From: i5513@hotmail.com (i5513)
Subject: How can I get stats about how many time is a program into a function?
Message-Id: <a657ec02.0305201057.3223a776@posting.google.com>

Hello again, sorry but I don't know how to search about it.

I'd like know how "monitorize" my functions.
By examples:

perl [- xxx] example.pl
 ... after my output ...
function1: 0.05 %  (0.01 s)
function2: 3.00 %  (0.04 s)
function3: 30 %    (0.4 s)
 ...
functionN: 10 %     (0.1 s)

I'd like to know where is go out my excesive time on my program;

Where can I do find some information about it?

Thank you again.


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

Date: 20 May 2003 19:29:12 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: How can I get stats about how many time is a program into a function?
Message-Id: <badvm8$l6$1@nets3.rz.RWTH-Aachen.DE>

Also sprach i5513:

> Hello again, sorry but I don't know how to search about it.
> 
> I'd like know how "monitorize" my functions.
> By examples:
> 
> perl [- xxx] example.pl
> ... after my output ...
> function1: 0.05 %  (0.01 s)
> function2: 3.00 %  (0.04 s)
> function3: 30 %    (0.4 s)
> ...
> functionN: 10 %     (0.1 s)
> 
> I'd like to know where is go out my excesive time on my program;
> 
> Where can I do find some information about it?

See 'perldoc Devel::DProf'. It is pretty exactly what you want.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Tue, 20 May 2003 13:28:58 -0500
From: Robert Grignon <robert@inphact.com>
Subject: Re: mark-symlinked-directories
Message-Id: <1vskcvkn5ij4btgbnp7676a9gtucm6o9ma@4ax.com>

I just upgraded Bundle::CPAN and started receiving this error as well.

What the best way to resolve this error?

Thanks,

Rob

On 19 May 2003 09:35:17 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:

>Pons <pons@gmx.li> wrote in comp.lang.perl.misc:
>> [root@Linux bin]# perl -MCPAN -e shell
>> Undefined value assigned to typeglob at (eval 13) line 15, <RC> line 11.
>> Warning [/etc/inputrc line 11]:
>>   Invalid variable `mark-symlinked-directories'
>> 
>> cpan shell -- CPAN exploration and modules installation (v1.70)
>> ReadLine support enabled
>
>/etc/inputrc is a configuration file used by readline.  Apparently
>it is corrupt.
>
>Since the CPAN shell uses readline it makes sense that the error turns
>up when CPAN is activated.
>
>Anno




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

Date: 20 May 2003 19:47:01 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: mark-symlinked-directories
Message-Id: <bae0nl$gmt$1@mamenchi.zrz.TU-Berlin.DE>

[Post moved into context.  Please don't top-post}

Robert Grignon  <robert@inphact.com> wrote in comp.lang.perl.misc:
> On 19 May 2003 09:35:17 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
> Siegel) wrote:
> 
> >Pons <pons@gmx.li> wrote in comp.lang.perl.misc:
> >> [root@Linux bin]# perl -MCPAN -e shell
> >> Undefined value assigned to typeglob at (eval 13) line 15, <RC> line 11.
> >> Warning [/etc/inputrc line 11]:
> >>   Invalid variable `mark-symlinked-directories'
> >> 
> >> cpan shell -- CPAN exploration and modules installation (v1.70)
> >> ReadLine support enabled
> >
> >/etc/inputrc is a configuration file used by readline.  Apparently
> >it is corrupt.
> >
> >Since the CPAN shell uses readline it makes sense that the error turns
> >up when CPAN is activated.
>
> I just upgraded Bundle::CPAN and started receiving this error as well.
> 
> What the best way to resolve this error?

I don't know.

Term::ReadLine is really only a common front-end to various "readline"
packages, so little can be said in general.  I have occasionally corrected
problems with Term::ReadLine (problems of a quite different nature)
by installing Term::ReadLine::Gnu, but I don't know if that would help
with your problem, or if it is even something plausible to attempt.

Anno


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

Date: Tue, 20 May 2003 14:48:59 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl: Regex help request
Message-Id: <slrnbcl1la.2r2.tadmc@magna.augustmail.com>

deepak p <deepak10000@hotmail.com> wrote:

> I need to replace null values in a pipe separated data file with 0.

> If anyone can show me how to apply the substitute command or do it any
> other way to get the desired result, I would appreciate it greatly.

> while (<FILE_IN2) {


    Do not re-type Perl code
        Use copy/paste or your editor's "import" function rather than
        attempting to type in your code. If you make a typo you will get
        followups about your typos instead of about the question you are
        trying to get answered.


>    chomp;
>    print "Dollar_under before is $_\n";
>    s/\|\|/\|0\|/g;
            ^  ^
            ^  ^

You do not need those backslashes, the replacement part is a string,
not a regex.


   $_ = join '|', map length() ? $_ : '0', split /\|/, $_, -1;

Ta da!

With comments:

   $_ = join '|',                     # bar separated
             map length() ? $_ : '0', # gets a zero if empty
                 split /\|/, $_, -1;  # split on bars, preserve trailing fields


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 20 May 2003 14:31:09 -0400
From: "Gregory K. Deal" <nospam.gregory.deal@unisys.com>
Subject: Problem with regular expression evaluation from perl 5.6 to 5.8
Message-Id: <bads0v$rsn$1@trsvr.tr.unisys.com>

We have a regular expression that runs as expected in perl 5.6, yet
functions differently (and thought to be wrong) in 5.8. Did RE handling
change in 5.8, were we doing something illegal or implementation dependent,
or what? Thanks for any input.

Original statement in 5.6 :
    regular expression as an IF argument :    if ($inst2_key =~
/_${index}$/) { . . . .
    This finds the pattern specified in the $index variable at the end of
the line. But, in 5.8, the IF did not match.

Modified statement in 5.8 :
    regular expression now :     if ($inst2_key =~  /_${index}/m) { . . . .
    This works as expected in 5.6 and 5.8




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

Date: Tue, 20 May 2003 15:04:38 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Problem with regular expression evaluation from perl 5.6 to 5.8
Message-Id: <slrnbcl2im.2r2.tadmc@magna.augustmail.com>

Gregory K. Deal <nospam.gregory.deal@unisys.com> wrote:

> We have a regular expression that runs as expected in perl 5.6, yet
> functions differently (and thought to be wrong) in 5.8. 


Can you post a short (less than 20-30 lines) and *complete* program
that illustrates the problem you are having?


> Thanks for any input.


I cannot duplicate your problem.


> Original statement in 5.6 :
>     regular expression as an IF argument :    if ($inst2_key =~
> /_${index}$/) { . . . .
>     This finds the pattern specified in the $index variable 


We need two things in order to evaluate whether a regex should
match or not: the string to match against, and the pattern to match.

We have neither.

What is in $inst2_key? What is in $index?


> at the end of
> the line. 


and preceded by an underscore character.


> But, in 5.8, the IF did not match.


The program below matches both times using 5.6.1 and 5.8.0.

----------------------
#!/usr/local/bin/perl
use strict;
use warnings;

$_ = 'otherstuff_INDEX';
my $index = 'INDEX';

print "matched\n" if /_${index}$/;

if ( /_${index}$/ ) {
   print "matched\n";
}
----------------------


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 20 May 2003 20:45:32 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: why key is added to hash after defined ?
Message-Id: <u5nkcv0tgm0ueaj56em4kopqmdgqgar3u9@4ax.com>

X-Ftn-To: Veky 

veky@cromath.math.hr (Veky) wrote:
>|>|>Test for  defined $hash{foo1} && defined $hash{foo1}{foo2} ...
>|>|>this way, if there is no foo1 key in hash, short-circuiting of "&&" will
>|>|                       ^^^^^^^^^^^^^^^^^^^
>|>|Actually 'exists' does that, although defined is just fine most of the time.
>|>Yes, but original poster tested with defined, so I thought that would be
>|>fine for him...
>|You firstly wrote "defined $hash{foo1}" and after that "this way, if there
>|is no foo1 key in hash" 
>|from which it can be concluded that first statement tests for existence of
>|'foo1' key. 
>
>The conclusion would be wrong, and, of cource, non valid, by what I
>wrote down there.

I thought that with "this way," you've refering to previous expresion.
Obviously you weren't.

>|>BTW, my statement is mathematically correct. I said "if...then", and
>|>that direction really holds. I never said anything about the
>|>converse...:-)
>|I see, you're mathematician.. 
>
>Of course. Is it so obvious:-? :-)

I think it is, my math teacher spoke in similar way. :))

>|PMF? :)
>
>Not exactly, but... let's say so.
>Math faculty in Zagreb.

Cool, kaj se od jezika najvise preferira, C?



-- 
Matija


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

Date: Tue, 20 May 2003 20:40:52 +0100
From: "robert delaney" <robertdelaney@blueyonder.co.uk>
Subject: YaBB forum
Message-Id: <xyvya.497$KU.17@news-binary.blueyonder.co.uk>

im trying to setup a YaBB forum.I know my isp supports perl but in the
readme file it says"in the cgi-bin folder(or proper directory designated by
your web host for containing perl scripts)" ?? there isent a cgi-bin folder
how would i know which folder to put the YaBB folders in ? ive searched the
help site to no avail




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

Date: Tue, 20 May 2003 20:56:59 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: YaBB forum
Message-Id: <87he7pwd0n.fsf@mithril.chromatico.net>

"robert delaney" <robertdelaney@blueyonder.co.uk> writes:

> im trying to setup a YaBB forum.I know my isp supports perl but in
> the readme file it says"in the cgi-bin folder(or proper directory
> designated by your web host for containing perl scripts)" ?? there
> isent a cgi-bin folder how would i know which folder to put the YaBB
> folders in ? ive searched the help site to no avail

That's where the 'proper directory designated by your web host for
containing perl scripts' part comes in.

We aren't your web host; we don't know their configuration. Talk to them.

Charlton


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

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.  

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


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