Brushing up on Perl?

Steve smorrey at gmail.com
Thu Jan 10 12:04:55 MST 2008


A simplified version would probably just be.
if($c_data >{value} ||= [])
      last MINE;

Would that be correct?

On Jan 10, 2008 12:01 PM, Steve <smorrey at gmail.com> wrote:
> Alright I get it now.
> The code works by creating an array of true or false values.
> It then tries to swap the key value pairs on the array and assign the
> result to $x
> If $x is defined then we break the loop and return the last MINE
> whatever that may be.
>
> Is that correct guys?
>
>
> On Jan 10, 2008 11:45 AM, Steve <smorrey at gmail.com> wrote:
> > Ok I see my problem, I was reading $c_data>{value} as $c_data->{value}
> > I'll send a better explanation in a few minutes once I get the details
> > hammered out.
> >
> >
> > On Jan 10, 2008 11:28 AM, Steve <smorrey at gmail.com> wrote:
> > > Ok I'm totally lost on this lovely little one liner.
> > >
> > > MINE: {last MINE if ($x and grep defined,reverse
> > > @{$x}{@{$c_data>{value} ||= []}})}
> > >
> > > As I read it, it's basically saying
> > >
> > > if $x and the result of grep is defined then reverse array at $x
> > > With that array being comprised of either $_data at value or an empty value.
> > > otherwise exit the loop
> > >
> > > Thats not making much sense to me, can someone please help me figure
> > > out what I'm missing here?
> > >
> >
>



More information about the PLUG mailing list