Re: [mh] Troubles with Perl hashes passed to sub

Wayne Gatlin <[email protected]>
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <CA+E=prwAqr7JdScF0gEno9HNiSRTn3_cWy480wuAyjBuN8WN-w@mail.gmail.com>
How about doing it something like this?

$combined->{'actions'}->{'I did'} = 'notify:idid';
$combined->{'actions'}->{'Remind Me Later'} = 'notify:remind_me_later';
$combined->{'actions'}->{'Open URL'} = 'url:
http://maps.google.com/maps?q=test';
$combined->{'urlvars'}->{'ttl'} = '300';


-Wayne

On Mon, Aug 17, 2020, 10:17 AM Rick Steeves via misterhouse-users <
[email protected]> wrote:

> hashes have no specific order in perl. For that you need arrays, or
> sorting.
>
> I've never used Dumper (apparently I always do things the hard way).
> I'd normally have that data stored as (from other code):
>
> $fleetBlock{$key}{'player'},$fleetBlock{$key}{'owner'},$fleetBlock{$key}{'battlePlan'}
>
> or $fleetList{$player}{$fleet1}{shipCount}
>
>
>
>
> I'd probably just lump all the data together into one delineated string,
> and then split it apart, if I was stuck. And looks like I've been stuck
> that way in the past
> $fleetList{$player}{$fleet1}{shipCount} = join(',', @shipCount1);
>
>
> So I'd be passing around
> "myself|userid|deviceid|title|text|actions|URLS" and using split and join.
>
>
> Probably not helpful at all, but what I've got.
>
> rick
>
>
> On 8/17/2020 10:18 AM, Stephen Switzer wrote:
> > Hi everyone! Although I'm trying to modify code in my MH code directory
> > unsuccessfully, this could apply anywhere. I've googled and tried to
> > come up with ways to get this done, but it's time that I seek help.
>
>
> ________________________________________________________
> To unsubscribe from this list, go to:
> https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.