in reply to putting the return value from defined for one hash as the value in another
If you do, then the problem is not in your logic but your data.#!/usr/bin/perl use strict; use warnings; my (%ilb, %abs); for my $key (qw/foo bar baz/) { $abs{$key} = {}; } for my $key (qw/blah baz asdf/) { $ilb{$key} = {pos => $key, abs => (defined $abs{$key} ? 1 : 0)}; }
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: putting the return value from defined for one hash as the value in another
by Moron (Curate) on Apr 18, 2007 at 21:35 UTC |