[30412] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1655 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 18 11:09:52 2008

Date: Wed, 18 Jun 2008 08:09:11 -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           Wed, 18 Jun 2008     Volume: 11 Number: 1655

Today's topics:
    Re: [regex] grep for chars in any order <glennj@ncf.ca>
    Re: [regex] grep for chars in any order <benkasminbullock@gmail.com>
    Re: grep for chars in any order <simon.chao@fmr.com>
    Re: grep for chars in any order <mritty@gmail.com>
    Re: grep for chars in any order <jurgenex@hotmail.com>
    Re: grep for chars in any order <simon.chao@fmr.com>
        Last "real" modification date of file <bart@nijlen.com>
    Re: Last "real" modification date of file <jurgenex@hotmail.com>
    Re: Learning Perl <sbour@niaid.nih.gov>
    Re: Learning Perl <sbour@niaid.nih.gov>
    Re: Learning Perl <g....c.e@gmail.com>
    Re: Learning Perl <dragnet\_@_/internalysis.com>
    Re: Perl Script <cartercc@gmail.com>
        Perl XML::Simple Accessing complex XML <zzapper@gmail.com>
    Re: Perl XML::Simple Accessing complex XML <john1949@yahoo.com>
    Re: Perl XML::Simple Accessing complex XML <zzapper@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 18 Jun 2008 11:04:21 GMT
From: Glenn Jackman <glennj@ncf.ca>
Subject: Re: [regex] grep for chars in any order
Message-Id: <slrng5hqtl.43k.glennj@smeagol.ncf.ca>

At 2008-06-18 03:06AM, "viki" wrote:
>  How can I build regex that matches all characters of the string $STR
>  in any order with  .* added between any two characters: ?
>  And without generating all N! transpositions (where N is length of
>  $STR) ?
>  Example.
>  For $STR "abc", I want to match equivalent to:
>  /(a.*b.*c)|(a.*c.*b)|(b.*a.*c)|(b.*c.*a)|(c.*a.*b)|(c.*b.*a)/

    print 'matched' if $STR =~ /a(?=.*b)(?=.*c)/
                    or $STR =~ /b(?=.*a)(?=.*c)/
                    or $STR =~ /c(?=.*a)(?=.*b)/
or
    print 'matched' if $STR =~ /a(?=.*b)(?=.*c)|b(?=.*a)(?=.*c)|c(?=.*a)(?=.*b)/

So you don't have to create all the combinations but you do need all the
permutations (if I have my terminology correct)

-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous


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

Date: Wed, 18 Jun 2008 13:01:19 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: [regex] grep for chars in any order
Message-Id: <g3b0uv$prg$2@ml.accsnet.ne.jp>

On Wed, 18 Jun 2008 11:04:21 +0000, Glenn Jackman wrote:

>     print 'matched' if $STR =~ /a(?=.*b)(?=.*c)|b(?=.*a)(?=.*c)|c(?=.*a)
(?=.*b)/

Great! That is better than the solution I posted. But I have an 
improvement:

/(?=.*a)(?=.*b)(?=.*c)/

without any actual matching string also works, reducing the regex length 
from O(n^2) to O(n), where n is the number of characters.

> So you don't have to create all the combinations but you do need all the
> permutations (if I have my terminology correct)

You mean that you need all the combinations of initial characters, but 
not all the permutations (which would be O(n!)).



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

Date: Wed, 18 Jun 2008 06:40:19 -0700 (PDT)
From: nolo contendere <simon.chao@fmr.com>
Subject: Re: grep for chars in any order
Message-Id: <1d0a11c6-a794-41eb-8f5d-7900454aaafb@8g2000hse.googlegroups.com>

On Jun 18, 3:06=A0am, viki <viki...@gmail.com> wrote:
> How can I build regex that matches all characters of the string $STR
> in any order with =A0.* added between any two characters: ?
> And without generating all N! transpositions (where N is length of
> $STR) ?
> Example.
> For $STR "abc", I want to match equivalent to:
> /(a.*b.*c)|(a.*c.*b)|(b.*a.*c)|(b.*c.*a)|(c.*a.*b)|(c.*b.*a)/
>
> Generating all transpositions is not feasible for larger legths of
> $STR.
> /[abc].*[abc].*[abc]/ is easy and fast but gives false positives.
> What is good solution ?
>

use a math module to get permutations:
http://search.cpan.org/~allenday/Math-Combinatorics-0.09/lib/Math/Combinato=
rics.pm

then from those, build your regexes.


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

Date: Wed, 18 Jun 2008 07:32:28 -0700 (PDT)
From: Paul Lalli <mritty@gmail.com>
Subject: Re: grep for chars in any order
Message-Id: <c99b688f-921b-4c6f-b4cf-660b1abdc6ee@f63g2000hsf.googlegroups.com>

On Jun 18, 3:06=A0am, viki <viki...@gmail.com> wrote:
> How can I build regex that matches all characters of the string $STR
> in any order with =A0.* added between any two characters: ?
> And without generating all N! transpositions (where N is length of
> $STR) ?
> Example.
> For $STR "abc", I want to match equivalent to:
> /(a.*b.*c)|(a.*c.*b)|(b.*a.*c)|(b.*c.*a)|(c.*a.*b)|(c.*b.*a)/
>
> Generating all transpositions is not feasible for larger legths of
> $STR.
> /[abc].*[abc].*[abc]/ is easy and fast but gives false positives.
> What is good solution ?

#!/usr/bin/perl
use strict;
use warnings;
use List::MoreUtils qw/all/;

$STR =3D "whatever";

if (all { $STR =3D~ /$_/ } qw/a b c/) {
   print "Matched all of a, b, c\n";
}

__END__

Paul Lalli



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

Date: Wed, 18 Jun 2008 14:45:31 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: grep for chars in any order
Message-Id: <li7i54lc65ud9iviso3itu2g90204t89bg@4ax.com>

nolo contendere <simon.chao@fmr.com> wrote:
>On Jun 18, 3:06 am, viki <viki...@gmail.com> wrote:
>> How can I build regex that matches all characters of the string $STR
>> in any order with  .* added between any two characters: 

Maybe I am missing something, but isn't that the same as the text begins
and ends with a character from $str and all the other characters of $str
are included somewhere in the text?
It should be fairly easy to find an algorithm to check for that. You
just need to be careful about how to handle duplicate characters in $STR
and/or the text.

jue


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

Date: Wed, 18 Jun 2008 07:58:18 -0700 (PDT)
From: nolo contendere <simon.chao@fmr.com>
Subject: Re: grep for chars in any order
Message-Id: <25286f73-727c-4d59-90df-fddf1d948aa3@k37g2000hsf.googlegroups.com>

On Jun 18, 10:45=A0am, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> nolo contendere <simon.c...@fmr.com> wrote:
> >On Jun 18, 3:06=A0am, viki <viki...@gmail.com> wrote:
> >> How can I build regex that matches all characters of the string $STR
> >> in any order with =A0.* added between any two characters:
>
> Maybe I am missing something, but isn't that the same as the text begins
> and ends with a character from $str and all the other characters of $str
> are included somewhere in the text?
> It should be fairly easy to find an algorithm to check for that. You
> just need to be careful about how to handle duplicate characters in $STR
> and/or the text.
>

Those are both great points. Perhaps the OP could further refine the
requirements, or state the larger goal.


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

Date: Wed, 18 Jun 2008 07:03:20 -0700 (PDT)
From: Bart Van der Donck <bart@nijlen.com>
Subject: Last "real" modification date of file
Message-Id: <d3c773cf-4218-49f8-988f-31eb86f791ff@34g2000hsf.googlegroups.com>

Hello,

I am on FreeBSD.

  my @stat = stat "file.txt";
  print "Last modified: ";
  print time()-$stat[9]." seconds ago";

Is there a way to find out when file.txt was last changed ?
I'm facing a situation when a file could legally be (re-)written with
the same content. Don't ask me how I got there :-)

Thanks for any hints,

--
 Bart


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

Date: Wed, 18 Jun 2008 14:08:20 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Last "real" modification date of file
Message-Id: <9i5i545cm55cq47542dvbu735527pi3sue@4ax.com>

Bart Van der Donck <bart@nijlen.com> wrote:
>I am on FreeBSD.
>
>Is there a way to find out when file.txt was last changed ?
>I'm facing a situation when a file could legally be (re-)written with
>the same content. Don't ask me how I got there :-)

That depends upon if the file system (not the OS!) supports such a
value.
And for legal matters also if there are any means to set that value
manually.

jue


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

Date: Wed, 18 Jun 2008 06:44:01 -0700
From: "Stephan Bour" <sbour@niaid.nih.gov>
Subject: Re: Learning Perl
Message-Id: <Ci86k.5823$N87.5196@nlpi068.nbdc.sbc.com>

Jürgen Exner wrote:
} "Stephan Bour" <sbour@niaid.nih.gov> wrote:
} > [about filtering]
} > surprised some people change their email addresses to avoid it.
}
} I dare to claim the right to select whom I want to listen to. While
} everyone has the right to express himself, there is no right that he
} has to be heard.

I agree.

} I don't care what a certain nutcase posts. I don't want to read it. I
} don't want anything to do with it. I am happy to do anything
} reasonable on my part to avoid his posts.

I also agree with that.

} However if someone deliberately changes his FROM header with the
} expressed purpose(!) of avoiding not being heard, then that is simply
} stalking and in many jurisdictions a criminal act.

I have to disagree here. I don't see how you can equate changing a FROM 
header to following someone to their home and watching them through their 
window, which is what stalking typically involves. On Usenet, no such 
legislation exists, so please don't try to create them as you go.

} > If youreally don't want to read what someone has to say, then simply 
don't
} > :~)
}
} Don't worry, I won't be reading you any more.

And that's you choice. On the other hand, if people like you were mature 
enough to avoid name calling and were actually willing to cite examples to 
backup your accusations that you keep making (and possibly your behaviors,) 
you probably wouldn't get type of responses like you did from me in the 
first place. Not everyone likes to sit idle while a group of people beats a 
man senseless in the street.

You cannot tell me I didn't give you and others ample opportunity to provide 
some citations, and none of you did, so I left with the conclusion that this 
is another classic example of group-think and people getting branded far 
lower than they deserved. I've been on Usenet long enough to know this is 
nothing new. I don't expect you or Keith or Uri to admit any faults of your 
own in cases like these, that any of you had acted inappropriately, seeing 
as you can't even prove your cases by the simplest of methods.


Stephan. 




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

Date: Wed, 18 Jun 2008 06:55:33 -0700
From: "Stephan Bour" <sbour@niaid.nih.gov>
Subject: Re: Learning Perl
Message-Id: <qt86k.5824$N87.2991@nlpi068.nbdc.sbc.com>

Marc Bissonnette wrote:
} Jürgen Exner <jurgenex@hotmail.com> fell face-first on the keyboard.
} This was the result: news:4t6h54pbtbp14hsm3lp2qe6djk9qufgvc5@4ax.com:
}
} > "Stephan Bour" <sbour@niaid.nih.gov> wrote:
} > > [about filtering]
} > > surprised some people change their email addresses to avoid it.
}
} > However if someone deliberately changes his FROM header with the
} > expressed purpose(!) of avoiding not being heard, then that is simply
} > stalking and in many jurisdictions a criminal act.
}
} I have to agree strongly with this point: While one may have the
} "right" to change one's From: header ("right" as in, it's your app,
} your information, your computer), it is simply childish attention
} getting [1] to change your From: header for the sole purpose of
} getting around filters.

It may be childish, agreed, but another side may be that no one is bound to 
adhering to your filters. Some of you seem to over look this little tidbit 
all too easily.

} If someone has decided they don't want to
} read - and therefore respond - to your content, who are you [2] to
} force them to see your content ?

That's where you are really wrong; no one is forced to do _anything_, as you 
do not have to read _any_ post. Everything you do is by your own choice. If 
I were to tie you to your chair and tape your eye lids open and shove a 
laptop with the content opened into your face, that would be another story, 
but it's most decidedly not the cases here.

} [1] I'll admit to doing this myself about three times in fifteen
} years - Twice when the heat of an online argument got the better of
} me and once to respond to a nutjob who supposedly had me killfiled,
} but used Google Groups to reply to my posts when others were agreeing
} with them -

So it seems here, you are almost vindicating the people who do change their 
FROM header. You don't do it often, but you did do it to get around 
someone's killfile.

} In all three cases, still childish and plain dumb. Other
} than that, my dragnet@ address has remained the same for ten years or
} so, with only one change to add \_ and _/ around the @ to mildly mess
} up harvesters.

And in doing such changes you bypass any filters that have you. And again 
you've proved that anyone has the right to change such information, childish 
or not.


Stephan. 




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

Date: Wed, 18 Jun 2008 07:41:03 -0700
From: "Gordon Corbin Etly" <g....c.e@gmail.com>
Subject: Re: Learning Perl
Message-Id: <6bsl40F3dbbivU1@mid.individual.net>

Uri Guttman wrote:
>>>>>> "GCE" == Gordon Corbin Etly <g....c.e@gmail.com> writes:

> > > use strict ;
> > > use warnings ;
> > >
> > > foreach ( 1 .. 3 ) {
> > >
> > > my @array ;
> > > print "defined $_\n" if defined @array ;
> > > print "empty $_\n" unless @array ;
> > > @array = (1) ;
> > > }

> > Yes you've already posted this. It actually shows what appears to
> > be broken behavior, given how a new @array is created each time
> > through the loop. And you still haven't answered my question of
> > why it would be bad to fix define in a way that it works with
> > scalars - it doesn't seem unreasonable, especially when that's
> > almost how it works currently, deprecated or not.

> see you don't get it. it isn't broken behavior but behavior that
> shouldn't have been there to begin with. like my $x = 1 if 0 stuff
> which does something that was bad but not deprecated until recently.

I do get it. Maybe tell nose thumbing would allow us to understand each 
other better.


> and it doesn't almost work that way. and you don't get how allocation
> works or the difference between a scalar value and an aggregate of
> them. just let this go as you don't want to learn those things and you
> are hanging on your little island hoping to be rescured. p5p ain't
> coming to rescue you. defined on aggregates was never meant to be used
> and now it will go away like it should.

Stop assuming I don't get things or that I don't want to learn, as that 
couldn't be further from the truth.


-- 
G. C. Etly 




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

Date: Wed, 18 Jun 2008 10:04:48 -0500
From: Marc Bissonnette <dragnet\_@_/internalysis.com>
Subject: Re: Learning Perl
Message-Id: <Xns9AC170B5FD5A9dragnetinternalysisc@216.196.97.131>

"Stephan Bour" <sbour@niaid.nih.gov> fell face-first on the keyboard.
This was the result: news:qt86k.5824$N87.2991@nlpi068.nbdc.sbc.com: 

> Marc Bissonnette wrote:
> } Jürgen Exner <jurgenex@hotmail.com> fell face-first on the keyboard.
> } This was the result:
> news:4t6h54pbtbp14hsm3lp2qe6djk9qufgvc5@4ax.com: }
> } > "Stephan Bour" <sbour@niaid.nih.gov> wrote:
> } > > [about filtering]
> } > > surprised some people change their email addresses to avoid it.
> }
> } > However if someone deliberately changes his FROM header with the
> } > expressed purpose(!) of avoiding not being heard, then that is
> simply } > stalking and in many jurisdictions a criminal act.
> }
> } I have to agree strongly with this point: While one may have the
> } "right" to change one's From: header ("right" as in, it's your app,
> } your information, your computer), it is simply childish attention
> } getting [1] to change your From: header for the sole purpose of
> } getting around filters.
> 
> It may be childish, agreed, but another side may be that no one is
> bound to adhering to your filters. Some of you seem to over look this
> little tidbit all too easily.
> 
> } If someone has decided they don't want to
> } read - and therefore respond - to your content, who are you [2] to
> } force them to see your content ?
> 
> That's where you are really wrong; no one is forced to do _anything_,
> as you do not have to read _any_ post. Everything you do is by your
> own choice. If I were to tie you to your chair and tape your eye lids
> open and shove a laptop with the content opened into your face, that
> would be another story, but it's most decidedly not the cases here.

I disagree: Personally, I use XNews as my newsreader. I have three people 
in my killfile that are, IMO, prolific nonsense posters. When they are 
killfiled, my articles list is short and concise - I can see the ebb and 
flow of any discussion and choose to read it or not - I don't see the 
ko0k's content *OR* headers, because they are filtered out. 

When they morph, I am indeed forced to see their article headers, meaning 
the three newsgroups they appear in are indeed far more cluttered and 
makes a quick glance at a conversation's ebb and flow more difficult. 

Perhaps *you* don't look at Usenet this way, or skimming articles, but I 
and a great many others do. I know for a fact that a great many people 
agree with this definition of being "forced" to see the content. 

> } [1] I'll admit to doing this myself about three times in fifteen
> } years - Twice when the heat of an online argument got the better of
> } me and once to respond to a nutjob who supposedly had me killfiled,
> } but used Google Groups to reply to my posts when others were
> agreeing } with them -
> 
> So it seems here, you are almost vindicating the people who do change
> their FROM header. You don't do it often, but you did do it to get
> around someone's killfile.
> 
> } In all three cases, still childish and plain dumb. Other
> } than that, my dragnet@ address has remained the same for ten years
> or } so, with only one change to add \_ and _/ around the @ to mildly
> mess } up harvesters.
> 
> And in doing such changes you bypass any filters that have you. And
> again you've proved that anyone has the right to change such
> information, childish or not.

Sigh. With all due respect, I believe you are being a pedant 
intentionally. Surely, you don't need actual examples of things where one 
has the "right" to do something, but common sense or courtesy curtails 
it, yes ? Scratch that - I get the feeling you want to take the pedantic 
route, so let's see if I can think of an appropriate example. 

Ah! Here's one: My neighbour right now is having his septic tank and 
weeping bed replaced. Given the access to his backyard is quite narrow 
due to two buildings, two massive trees and three sheds, I've told their 
crew they can use my lane and remove the fence between our two yards to 
move their machinery in to do the digging, as well as the crane in my 
laneway to lower the new septic tank.

I have the *RIGHT* to say "Stay off my property". It's *my* property - I 
don't *have* to let heavy equipment over my lawn, remove a fence and 
damage the soil. There wouldn't be a bloody thing my neighbour could do 
about it, either - Without access via my property, they'd have to bring 
in a skidsteer and a small Kubota excavator, rather than the one Case 
backhoe, which would extend the job by a week and increase the labour and 
cost by a factor of five. 

But by your logic, it would be perfectly fine to excersise my *right* to 
deny access to my property - Legally, I'm totally covered. Morally, 
however, it's a crappy thing to do. 

Somehow, I think that if you were a Canadian, you'd be a die-hard NDP 
voter.  



-- 
Marc Bissonnette
Looking for a new ISP? http://www.canadianisp.com
Largest ISP comparison site across Canada.


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

Date: Wed, 18 Jun 2008 06:10:16 -0700 (PDT)
From: cartercc <cartercc@gmail.com>
Subject: Re: Perl Script
Message-Id: <a1d8f6cb-7746-40e7-b0da-f542bbbd39ae@e39g2000hsf.googlegroups.com>

On Jun 17, 5:44 am, "Dr.Ruud" <rvtol+n...@isolution.nl> wrote:
> You have plain passwords in the database?

I do as well for a couple of apps. The reason: a management decision
that when the user forgets his or her password, an event that occurs
often, we are to give the user his old password instead of forcing him
to generate a new password. If we encrypted the passwords in the
database, we couldn't do this.

CC


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

Date: Wed, 18 Jun 2008 05:05:15 -0700 (PDT)
From: zzapper <zzapper@gmail.com>
Subject: Perl XML::Simple Accessing complex XML
Message-Id: <d4825f41-4e5b-4cbd-b8ee-2288c0cb0cc5@r66g2000hsg.googlegroups.com>

Hi
<companyname count="1">
<property id="55467" md="2008-03-20" mc="GBP" mp="173000" >
<psumm><![CDATA[This 3 bedroom, ]]></psumm>
<a1>1 Bucket Way</a1>
<at>Stafford</at>
<ac>Staffordshire</ac>
<actry></actry>
<images>
     <image id="543">Property Image</image>
     <image id="545">Property Image</image>
</images>
</property>
</companyname>

I am trying to read the above (simplified) with XML::Simple with or
without ForceArray=1.

I can output everything EXCEPT I cannot find the Perl data syntax to
access anything in <images> eg  543 or
 the text "Property Image"

$data = $xml->XMLin("prop.xml", forcearray => 1);
$ac=$data->{property}->{554674}->{ac}[0];

Desperate!!
zzapper





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

Date: Wed, 18 Jun 2008 13:39:33 +0100
From: "John" <john1949@yahoo.com>
Subject: Re: Perl XML::Simple Accessing complex XML
Message-Id: <g3avm5$a4l$1@news.albasani.net>


"zzapper" <zzapper@gmail.com> wrote in message 
news:d4825f41-4e5b-4cbd-b8ee-2288c0cb0cc5@r66g2000hsg.googlegroups.com...
> Hi
> <companyname count="1">
> <property id="55467" md="2008-03-20" mc="GBP" mp="173000" >
> <psumm><![CDATA[This 3 bedroom, ]]></psumm>
> <a1>1 Bucket Way</a1>
> <at>Stafford</at>
> <ac>Staffordshire</ac>
> <actry></actry>
> <images>
>     <image id="543">Property Image</image>
>     <image id="545">Property Image</image>
> </images>
> </property>
> </companyname>
>
> I am trying to read the above (simplified) with XML::Simple with or
> without ForceArray=1.
>
> I can output everything EXCEPT I cannot find the Perl data syntax to
> access anything in <images> eg  543 or
> the text "Property Image"
>
> $data = $xml->XMLin("prop.xml", forcearray => 1);
> $ac=$data->{property}->{554674}->{ac}[0];
>
> Desperate!!
> zzapper

Hi

With ForceArray turned on.

my $temp=$data->{property}->[0]->{images}->[0]->{image}->[0]{id}; # id of 
first image
$temp=$data->{property}->[0]->{images}->[0]->{image}->[1]{id}; # id of 
second image
$temp=$data->{property}->[0]->{images}->[0]->{image}->[0]{content}; # 
Property Image of first image
$temp=$data->{property}->[0]->{images}->[0]->{image}->[1]{content}; # 
Property Image of second image

Regards
John




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

Date: Wed, 18 Jun 2008 06:06:38 -0700 (PDT)
From: zzapper <zzapper@gmail.com>
Subject: Re: Perl XML::Simple Accessing complex XML
Message-Id: <384b28cf-598d-4911-9612-8ec9e2013c3a@m44g2000hsc.googlegroups.com>

On Jun 18, 1:39=A0pm, "John" <john1...@yahoo.com> wrote:
> "zzapper" <zzap...@gmail.com> wrote in message
>
> news:d4825f41-4e5b-4cbd-b8ee-2288c0cb0cc5@r66g2000hsg.googlegroups.com...
>
>
>
> > Hi
> > <companyname count=3D"1">
> > <property id=3D"55467" md=3D"2008-03-20" mc=3D"GBP" mp=3D"173000" >
> > <psumm><![CDATA[This 3 bedroom, ]]></psumm>
> > <a1>1 Bucket Way</a1>
> > <at>Stafford</at>
> > <ac>Staffordshire</ac>
> > <actry></actry>
> > <images>
> > =A0 =A0 <image id=3D"543">Property Image</image>
> > =A0 =A0 <image id=3D"545">Property Image</image>
> > </images>
> > </property>
> > </companyname>
>
> > I am trying to read the above (simplified) with XML::Simple with or
> > without ForceArray=3D1.
>
> > I can output everything EXCEPT I cannot find the Perl data syntax to
> > access anything in <images> eg =A0543 or
> > the text "Property Image"
>
> > $data =3D $xml->XMLin("prop.xml", forcearray =3D> 1);
> > $ac=3D$data->{property}->{554674}->{ac}[0];
>
> > Desperate!!
> > zzapper
>
> Hi
>
> With ForceArray turned on.
>
> my $temp=3D$data->{property}->[0]->{images}->[0]->{image}->[0]{id}; # id =
of
> first image
> $temp=3D$data->{property}->[0]->{images}->[0]->{image}->[1]{id}; # id of
> second image
> $temp=3D$data->{property}->[0]->{images}->[0]->{image}->[0]{content}; #
> Property Image of first image
> $temp=3D$data->{property}->[0]->{images}->[0]->{image}->[1]{content}; #
> Property Image of second image
>
> Regards
> John

Hi John
Unfortunately this didn't work for me, the output was blank.
zzapper


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

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


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