[30324] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1567 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 22 14:14:25 2008

Date: Thu, 22 May 2008 11:14:16 -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, 22 May 2008     Volume: 11 Number: 1567

Today's topics:
        maintaining order in a hash (without Tie::IxHash) <simon.chao@fmr.com>
    Re: maintaining order in a hash (without Tie::IxHash) <uri@stemsystems.com>
    Re: maintaining order in a hash (without Tie::IxHash) <simon.chao@fmr.com>
    Re: Order of operations <ben@morrow.me.uk>
    Re: Out of memory! Yet ... sln@netherlands.co
    Re: Perl 6 <.@.invalid>
    Re: Perl 6 <jurgenex@hotmail.com>
    Re: Perl 6 <spamtrap@dot-app.org>
        regexp to replace some number of characters? davidfilmer@gmail.com
    Re: regexp to replace some number of characters? <wahab@chemie.uni-halle.de>
    Re: regexp to replace some number of characters? <peter@makholm.net>
    Re: regexp to replace some number of characters? <rvtol+news@isolution.nl>
    Re: Strawberry <1usa@llenroc.ude.invalid>
    Re: stripping off part of the string <smallpond@juno.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 22 May 2008 10:20:17 -0700 (PDT)
From: nolo contendere <simon.chao@fmr.com>
Subject: maintaining order in a hash (without Tie::IxHash)
Message-Id: <7d5cdff9-da1a-4877-932e-68d6583be4e6@k37g2000hsf.googlegroups.com>

Many times, there exists a module on CPAN that solves a problem I'm
attempting to solve.
I'm aware that generally the better choice to solving such a problem
is to use the CPAN module.
However, regarding the problem of maintaining sort order of a hash,
and the Tie::IxHash module, I have a question.

I've heard that Tie::IxHash can be a little slow, and the cost of
using this in addition to installation costs (where developers don't
have the permission to have modules installed, especially across all
environments, and the process for having the module(s) installed by
admins can be trying to say the least) is much higher than the simple
solution of adding an extra sortval attribute to a hash value, where
the value of sortval is simply an incremented counter.

then if you need to access the hash in the order in which items were
inserted, you could simply:

for my $key ( sort { $hash{$a}{sortval} <=> $hash{$b}{sortval} } keys
%hash ) {
    # do something
}


Is there something wrong with my reasoning? Would this solution be a
good candidate for addition into the FAQ How can I make my hash
remember the order I put elements
          into it?




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

Date: Thu, 22 May 2008 17:35:54 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: maintaining order in a hash (without Tie::IxHash)
Message-Id: <x7zlqiw8at.fsf@mail.sysarch.com>

>>>>> "nc" == nolo contendere <simon.chao@fmr.com> writes:

  nc> then if you need to access the hash in the order in which items were
  nc> inserted, you could simply:

  nc> for my $key ( sort { $hash{$a}{sortval} <=> $hash{$b}{sortval} } keys
  nc> %hash ) {
  nc>     # do something
  nc> }

and how do you set the sortval for each key? how do you know the order
of insertion without a counter (internal to this hash or external)? also
do you realize that construction means the top level keys are really
hash refs and not the original key? and where is the value for each key?

these questions and their tricky answers are why this problem is best
solved by a working and tested module. it is not a trivial one line of
perl thing to have hashes which maintain some sort of order.

  nc> Is there something wrong with my reasoning? Would this solution be a
  nc> good candidate for addition into the FAQ How can I make my hash
  nc> remember the order I put elements
  nc>           into it?

well, if your answer covered all of those questions (and possibly more
as i haven't delved into this much) and showed working code, maybe. but
pointing to a working module is better and easier for almost all FAQ
answers. the excuse of not wanting/able to install modules is usually
bogus as there are many ways to install modules on almost any platform.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Thu, 22 May 2008 10:52:57 -0700 (PDT)
From: nolo contendere <simon.chao@fmr.com>
Subject: Re: maintaining order in a hash (without Tie::IxHash)
Message-Id: <f9c6862c-7f55-4ddf-b8ad-e50d02520857@z66g2000hsc.googlegroups.com>

On May 22, 1:35=A0pm, Uri Guttman <u...@stemsystems.com> wrote:
> >>>>> "nc" =3D=3D nolo contendere <simon.c...@fmr.com> writes:
>
> =A0 nc> then if you need to access the hash in the order in which items we=
re
> =A0 nc> inserted, you could simply:
>
> =A0 nc> for my $key ( sort { $hash{$a}{sortval} <=3D> $hash{$b}{sortval} }=
 keys
> =A0 nc> %hash ) {
> =A0 nc> =A0 =A0 # do something
> =A0 nc> }
>
> and how do you set the sortval for each key? how do you know the order
> of insertion without a counter (internal to this hash or external)? also
> do you realize that construction means the top level keys are really
> hash refs and not the original key? and where is the value for each key?

Below is an example, used in conjunction with File::Find

#!/usr/bin/perl

use strict; use warnings;
use Data::Dumper;
use File::Basename;
use Getopt::Long;
use File::Find;

my $script =3D basename $0;
my $USAGE =3D <<"END_USAGE";
DESCRIPTION:
  $script - finds the difference between two directory trees

USAGE EXAMPLE:
  $script --tree1=3D/path/to/tree1 --tree2=3D/path/to/tree2

OPTIONS:
  --toc
    file containing the 'tar tvf <file>.tar' contents

  --tree1
    path to the root of tree1

  --tree2
    path to the root of tree2

END_USAGE

my ( $tree1, $tree2 ) =3D ( '', '' );
GetOptions( "tree1=3Ds" =3D> \$tree1,
            "tree2=3Ds" =3D> \$tree2 ) or die $USAGE;

die "'$tree1' does not exist. Please read the usage notes.\n\n$USAGE
\n" unless -d $tree1;
die "'$tree2' does not exist. Please read the usage notes.\n\n$USAGE
\n" unless -d $tree2;

my ( %src, %tgt, $ctr1, $ctr2, %diffs );

find( \&get_src_info, $tree1 );
find( \&get_tgt_info, $tree2 );

for my $key ( sort { $src{$a}{sortval} <=3D> $src{$b}{sortval} } keys
%src ) {
    my $tgt_node =3D $key;
    $tgt_node    =3D~ s/$tree1/$tree2/;

    $diffs{$key} =3D '';

    if ( -d $key ) {
        if ( !-d $tgt_node ) {
            print "$tgt_node is missing from tree2!\n";
        }
    }
    else {
        if ( -e $tgt_node ) {
            my $cmd =3D qq{diff $key $tgt_node};
            my $diff =3D `$cmd`;
            $diffs{$key} =3D $diff;
        }
        else {
            print "$tgt_node is missing from tree2!\n";
        }
    }
}


my @msgs_diff;
my @msgs_nodiff;

for my $key ( sort keys %diffs ) {
    my $msg;
    if ( $diffs{$key} eq '' ) {
        $msg =3D "No differences for node: '$key'";
        push( @msgs_nodiff, $msg );
    }
    else {
        $msg =3D "For file '$key', there were the following differences:
\n$diffs{$key}";
        push( @msgs_diff, $msg );
    }
}

print "No Diffs in:\n", '-'x40, "\n";
print join( "\n", @msgs_nodiff ), "\n";

if ( @msgs_diff ) {
    my $mailbody =3D join( "\n", @msgs_diff );
    print "\nDiffs in:\n", '-'x40, "\n$mailbody";
    # do_mail('Diff in a file', $mailbody);
}

##=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
## subs
##=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

sub get_src_info {
#    print "\$File::Find::dir =3D $File::Find::dir\n";
#    print "\$File::Find::name =3D $File::Find::name\n";
#    print "\$_ =3D $_\n";

    my ( $mode, $uid, $gid, $size, $mtime ) =3D
(stat( $File::Find::name ))[2,4,5,7,9];
    $src{$File::Find::name} =3D {
        mode    =3D> $mode,
        uid     =3D> $uid,
        gid     =3D> $gid,
        size    =3D> $size,
        mtime   =3D> $mtime,
        sortval =3D> ++$ctr1,
    };
}

# I know, i shouldn't duplicate the code, just getting this working
for now
# this isn't even used, but thought it would be nice to have in case i
need the stats later.
sub get_tgt_info {
#    print "\$File::Find::dir =3D $File::Find::dir\n";
#    print "\$File::Find::name =3D $File::Find::name\n";
#    print "\$_ =3D $_\n";

    my ( $mode, $uid, $gid, $size, $mtime ) =3D
(stat( $File::Find::name ))[2,4,5,7,9];
    $tgt{$File::Find::name} =3D {
        mode    =3D> $mode,
        uid     =3D> $uid,
        gid     =3D> $gid,
        size    =3D> $size,
        mtime   =3D> $mtime,
        sortval =3D> ++$ctr2,
    };
}


>
> these questions and their tricky answers are why this problem is best
> solved by a working and tested module. it is not a trivial one line of
> perl thing to have hashes which maintain some sort of order.
>
> =A0 nc> Is there something wrong with my reasoning? Would this solution be=
 a
> =A0 nc> good candidate for addition into the FAQ How can I make my hash
> =A0 nc> remember the order I put elements
> =A0 nc> =A0 =A0 =A0 =A0 =A0 into it?
>
> well, if your answer covered all of those questions (and possibly more
> as i haven't delved into this much) and showed working code, maybe. but
> pointing to a working module is better and easier for almost all FAQ
> answers. the excuse of not wanting/able to install modules is usually
> bogus as there are many ways to install modules on almost any platform.

There are certainly ways of installing modules on machines by
circumventing the "process", but this can be risky, and it can be very
difficult to propagate the modules to prod machines.


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

Date: Thu, 22 May 2008 11:23:00 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Order of operations
Message-Id: <45ufg5-ou3.ln1@osiris.mauzo.dyndns.org>


Quoth Michael Carman <mjcarman@mchsi.com>:
> Ben Morrow wrote:
> > Quoth "John W. Krahn" <krahnj@telus.net>:
> >> I've had this discussion on c.l.p.misc before and it has been (rightly) 
> >> pointed out to me that precedence does not determine order of evaluation.
> > 
> > Can you give me an example? I can't really see how the yacc parser can
> > produce anything else...
> 
> Roughly speaking: Precedence defines the order in which operations are 
> performed. Order of evaluation defines the order in which the operands 
> are evaluated. Even if the parser always returns a particular order an 
> optimizing stage could decide to reorder things.
> 
> So in "f() + g() * h()" precedence says that the multiplication happens 
> before the addition but it does not dictate which order the functions 
> are called in. That's determined by the order of evaluation. If the 
> three functions are independent it doesn't matter, but if they have side 
> effects (like modifying shared global data) it could.

Yes, I understand the concept in general. I meant a specific example of
when *perl* reorders operations like that, since I don't believe it ever
does.

Ben

-- 
               We do not stop playing because we grow old; 
                  we grow old because we stop playing.
                            ben@morrow.me.uk


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

Date: Thu, 22 May 2008 09:25:44 -0700
From: sln@netherlands.co
Subject: Re: Out of memory! Yet ...
Message-Id: <293b34pasdf4eem8f4limtrmm56p79mr0o@4ax.com>

On Wed, 21 May 2008 23:32:52 -0700 (PDT), "alexxx.magni@gmail.com" <alexxx.magni@gmail.com> wrote:

>On 21 Mag, 18:11, "A. Sinan Unur" <1...@llenroc.ude.invalid> wrote:
>> "alexxx.ma...@gmail.com" <alexxx.ma...@gmail.com> wrote innews:e84cae72-e396-40a6-beec-4bad5aa3d615@d77g2000hsb.googlegroups.com:
>>
--<snip>--
>>
>> > The memory-eating line is this:
>> > for $i(1..$n)
>> > {
>> >   for $y(1..$ny)
>> >   {  for $x(1..$nx) { $AAA[$i][$x][$y]=$a[3+$nx*($y-1)+$x] }   }
>> >   print("\n$i>\ttotal size: ",total_size($AAA));
>> > }
>>
--<sip>--
>>
>> How large is the image? You are basically holding two copies of the
>> image in memory. Plus, you have the overhead of a multilevel data
>> structure.
>>
>> Even if you did not run out of memory, this smells. Without knowing any
>> details, it is hard to say definitely that what you are doing is wrong,
>> but I would have constructed the AoAoA in $AAA step by step while
>> reading the data.
>>
--<snip>--
>> Sinan
>> --
>> A. Sinan Unur <1...@llenroc.ude.invalid>
>> (remove .invalid and reverse each component for email address)
>>
>> comp.lang.perl.misc guidelines on the WWW:http://www.rehabitation.com/clpmisc/
>
>
>sorry if I didnt put all the info in - I didnt want to burden the
>newsgroup too much: my script is large (and of course I used
--<snip>--
>
>2) concerning the huge overhead, I cannot avoid it - I need all the
>images (indexed by $i) in parallel in $AAA[$i][$x][$y], since I have
>to process each pixel ($x,$y) along $i=1..$n ($n can vary, right now I
>have ~ 100 images). The alternative would be to continuously open the
>~100 images and read each time a different pixel: choosing whether to
>stress the disk or the RAM I choose the latter, but maybe it's too
>much.
>
>
>thanks everybody
>
> Alessandro

"..since I have"
">to process each pixel ($x,$y) along $i=1..$n "

Although a little confused, I thought this was interresting.

You made some statements along with including this code:

for $i(1..$n)
{
  for $y(1..$ny)
  {
     for $x(1..$nx)
     {
        $AAA[$i][$x][$y]=$a[3+$nx*($y-1)+$x]
  }
}

You said you are reading 100 gray scale images into @a,
flat file. Since the indices of $AAA never touch the same
element twice as an lvalue and since $AAA is never referenced
as an rvalue. This merely rearranges the values of @a into @AAA.
I am not sure this is a filter or even a conversion of say color to gray.

Lets do a little bitmap math.

Assume memory conservation:
1600 x 1200 pixels x 1 byte/8-bit(plane's) gray scale = 1.9 MB
100 gray scale images x 1.9 MB/image                  = 190 MB
Using 2 buffers                                       = 380 MB

Assume memory waste:
1600 x 1200 pixels x 8 byte/8-bit(plane's) gray scale = 15.36 MB
100 gray scale images x 15.36 MB/image                = 1.536 GB
Using 2 buffers                                       = 3.072 GB

You state that you are operating on each pixel "($x,$y) along $i=1..$n ".
If this is true, this would mean you are using 1 byte per pixel for a
data buffer.

Its very easy to work with data using bitmasks/bit-wise operators.

For example; $this &= ~($bit << $position);

So if you want to do a few simple bit manipulations, you could add a 
few hundred more images without running out of memory.

Explain what you are doing in greater depth, then you could get some
help here.



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

Date: Thu, 22 May 2008 09:02:03 -0700
From: "Gordon Etly" <.@.invalid>
Subject: Re: Perl 6
Message-Id: <69ljnuF31v97aU1@mid.individual.net>

David Combs wrote:
> In article <Xns9AA09211F9F98castleamber@130.133.1.4>,
> John Bokma  <john@castleamber.com> wrote:

> > Yup, that's online discussing stuff for you. I am a little like that
> > too I guess, and I see this behavior a lot. I have little doubt that
> > if you meet those people IRL they are really nice people. Also,
> > dealing every day with people who are too lazy to even pick a decent
> > subject, and expect that "the Usenet people" act as their private
> > help desk (free at that), makes someone not always replying in a
> > nice way, even to serious questions (it's the main reason why I am
> > giving up on Usenet again (and permanently this time), real soon).

> No, no, no, NO!, damnit, NO!
>
> Can't do that -- you're NEEDED here, John.
>
> You guys constitute an *invaluable* resource for, what, maybe
> thousands of people.  While you answer one guy's questions, etc,
> there's a whole bunch of us looking on, taking advantage of the
> (needed) extra education we get here.

 ... <snip rest of brown nosing>


Yes, one should be appreciative of anyone who offers you help. But 
people like John, who complain about "lazy" or ungrateful people, are 
misrepresenting reality. The people who fit into that description would 
be of a minority. Many people who receive decent help seem quite 
thankful. What I see happening, though, is some people, who otherwise 
offer actual help, taking out some frustrations from dealings with 
someone else on people who clearly didn't deserve it, and then refuse to 
admit any wrong doing and then other people come in to blindly defend 
them.


-- 
G.Etly 




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

Date: Thu, 22 May 2008 16:13:18 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Perl 6
Message-Id: <oh6b34l7kl1uhb5jgc7mvlru5q426s7lfs@4ax.com>

"Gordon Etly" <.@.invalid> wrote:
[nothing of consequence]

"Gordon Etly" <.@.invalid>, please meet your other personalities in my
killfile
	Author: Gordon Etly <get@bentsys.com>
	Author: Gordon Etly <getly@bentsys-INVALID.com>
	Author: Gordon Etly <g.etly@bent-INVALID-sys.com>
	Author: Gordon Etly <g.etly@bentsys.INVALID.com>?

Killfile, please welcome "Gordon Etly" <.@.invalid>, too.

jue


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

Date: Thu, 22 May 2008 13:50:04 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Perl 6
Message-Id: <m1prreteib.fsf@dot-app.org>

"Gordon Etly" <.@.invalid> writes:

> Yes, one should be appreciative of anyone who offers you help.

You weren't.

> Many people who receive decent help seem quite thankful.

You did, and you weren't.

> What I see happening, though, is some people, who otherwise 
> offer actual help, taking out some frustrations

One can see unicorns, if one squints just right and believes strongly
enough that they're there.

You were wrong about "PERL vs. Perl". Grow up and deal with it already.
This grudge of yours, and the constant bitching and moaning that comes
out of it, is truly pathetic.

Seriously. You had a misconception about the name of the language, and
you were corrected. Now you're carrying on as if the people here all got
together to shoot your dog or something. You *seriously* need to learn
some perspective.

Or keep whining - I don't care, your latest sock puppet is joining all
your others in my killfile. *plonk*

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Thu, 22 May 2008 01:49:13 -0700 (PDT)
From: davidfilmer@gmail.com
Subject: regexp to replace some number of characters?
Message-Id: <54f9b819-56f5-4a0d-a457-f51a2748e650@b9g2000prh.googlegroups.com>

Greetings.

I have some input data that looks something like this:

A NON-INDENTED LINE
   THIS LINE INDENTED THREE SPACES

The number of spaces that some lines are indented will vary.

I want to replace each leading space with a HTML-ish '&nbsp;' so that
the second line becomes

'&nbsp;&nbsp;&nbsp;THIS LINE...'

I can think of ugly ways to do this (like matching the whitespaces and
then substituting '&nbsp;' x length $whitespaces).  But I would prefer
to learn a more elegant solution.

Cheers!




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

Date: Thu, 22 May 2008 11:18:31 +0200
From: Mirco Wahab <wahab@chemie.uni-halle.de>
Subject: Re: regexp to replace some number of characters?
Message-Id: <g13dpf$1pam$1@nserver.hrz.tu-freiberg.de>

davidfilmer@gmail.com wrote:
> I have some input data that looks something like this:
> A NON-INDENTED LINE
>    THIS LINE INDENTED THREE SPACES
> The number of spaces that some lines are indented will vary.
> I want to replace each leading space with a HTML-ish '&nbsp;' so that
> the second line becomes
> '&nbsp;&nbsp;&nbsp;THIS LINE...'
> I can think of ugly ways to do this (like matching the whitespaces and
> then substituting '&nbsp;' x length $whitespaces).  But I would prefer
> to learn a more elegant solution.

This would then be like:
    ...
    $inputdata =~ s/^(\x20+)/'&nbsp;'x length($1)/mge;
    ..

another one would be:

    ...
    1 while $inputdata =~ s/^\x20|(?<=\&nbsp;)\x20/\&nbsp;/mg;
    ...

Which is nicer? I don't know.

Regards

M.


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

Date: Thu, 22 May 2008 12:08:00 +0200
From: Peter Makholm <peter@makholm.net>
Subject: Re: regexp to replace some number of characters?
Message-Id: <87y762d533.fsf@hacking.dk>

Mirco Wahab <wahab@chemie.uni-halle.de> writes:

> This would then be like:
>    ...
>    $inputdata =~ s/^(\x20+)/'&nbsp;'x length($1)/mge;
>    ..

I would do like this.

> another one would be:
>
>    ...
>    1 while $inputdata =~ s/^\x20|(?<=\&nbsp;)\x20/\&nbsp;/mg;
>    ...

Breaks if you have '&nbsp; ' other places in you line for some
reason. I would work from the other end:

    1 while $inputdata =~ s/^(\x20*)\x20/$1&nbsp;/;

//Makholm


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

Date: Thu, 22 May 2008 17:05:05 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: regexp to replace some number of characters?
Message-Id: <g14948.1og.1@news.isolution.nl>

davidfilmer@gmail.com schreef:

> I have some input data that looks something like this:
>
> A NON-INDENTED LINE
>    THIS LINE INDENTED THREE SPACES
>
> The number of spaces that some lines are indented will vary.
>
> I want to replace each leading space with a HTML-ish '&nbsp;' so that
> the second line becomes
>
> '&nbsp;&nbsp;&nbsp;THIS LINE...'
>
> I can think of ugly ways to do this (like matching the whitespaces and
> then substituting '&nbsp;' x length $whitespaces).  But I would prefer
> to learn a more elegant solution.

It can be done with a regex, because Perl allows code inside a regex,
but normally one would use the substitution operator s///.


I prefer the first solution of Mirco, but would write it like this:

    $inputdata =~ s/^(\s+)/'&nbsp;'x length($1)/mge;

to also replace other whitespace variants than " ".

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: Thu, 22 May 2008 09:09:26 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Strawberry
Message-Id: <Xns9AA63474B1109asu1cornelledu@127.0.0.1>

Michael Carman <mjcarman@mchsi.com> wrote in news:qg6Zj.120276$TT4.20285
@attbi_s22:

> A. Sinan Unur wrote:
>> Michael Carman <mjcarman@mchsi.com> wrote:
>>> A. Sinan Unur wrote:
>>>> I have quite a few Perl installations at the moment
>>> 
>>> Did you build them yourself or did you relocate (e.g.) ActivePerl 
>>> installations?
>> 
>> I have AS 5.8.8 and 5.10, cygwin Perl 5.8.8, 5.10 built using cygwin
>> and 5.10 built using VC++ 9 Express (and now Strawberry 5.10)
> 
> I'll assume that the versions you built yourself were targeted at 
> secondary locations at compile time.

Yes.

> Did you have to do anything to relocate ActivePerl beyond hacking 
> Config.pm and Config_heavy.pl? 

Actually, I don't think I did that. AS Perl 5.8.8 was installed in
c:\opt\perl58. I installed 5.10 in c:\opt\perl. 

> Have you tried installing modules on any of the secondary versions
> of Perl?

Yes. And with the exception of GD.pm (because I could not build some of 
the libraries required by libgd) for 5.10 compiled using VC++ 9 Express,  
cpanp works like a charm.

I don't think I have used ppm for AS 5.8.8 since I installed AS 5.10 
though. ... ... ... Yup, it works.

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

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/


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

Date: Thu, 22 May 2008 10:38:37 -0400
From: smallpond <smallpond@juno.com>
Subject: Re: stripping off part of the string
Message-Id: <f1cec$48358598$27014@news.teranews.com>

Ben Morrow wrote:
> Quoth smallpond <smallpond@juno.com>:
> 
>>Better would be:
>>
>>use Cwd;
>>my $path = cwd();
>>
>>$path =~ s/.*\/scripts/\./;
>>
>>Note that neither `pwd` nor cwd() should be adding that last / on your path.
>>So you should get ./test_scripts/src
> 
> 
> You do realise that (given that the OP was on Unix) Cwd just loads a
> whole lot of stuff only to end up invoking `pwd`, don't you? :)
> 

cwd() also strips the trailing newline.

> (There are good reasons to do it like this. Older systems that don't
> have a getcwd syscall often have /bin/pwd installed setid, so that you
> can find out your pwd even if you're in a directory you can't read.)
> 
> Ben
> 
** Posted from http://www.teranews.com **


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

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 V11 Issue 1567
***************************************


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