R
Rem-8
Hello
I've been sitting onto it for some time and I didn't have any clue how
to work it out.
Here's the idea.
I got two tables declared from on the beginning and need to generate a
hash table from such thing:
# These are declared tables:
my @xx = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
'11', '12', '13');
my @y = ('0', '1', '2', '3');
# From this I heed to create hash:
if ($line =~ /^.*-(\S+)\s+\S+\s+-f(\S+)\s+\S+.*$/) {
$1 will stand for @bcxx and $2 will stand for @bcy
Now I need to create hash tables from those values and compare them.
Finally I need to show values which do not fit. A clue is that @y
values should exist in each @xx, so there has to be 01 with values 0,
1, 2, 3.
I thought to do it like this:
$hash_xx_y{$xx}{$y} = 1
$hash_bcxx_bcy{$bcxx}{$y} = undef/1 - table for read values (may not
exist = undef; or they are ok = 1)
Then compare values from those two tables and print undefined values.
Can somebody give me a clue? Don't need whole code, just a clue how to
do it...
Thanks
I've been sitting onto it for some time and I didn't have any clue how
to work it out.
Here's the idea.
I got two tables declared from on the beginning and need to generate a
hash table from such thing:
# These are declared tables:
my @xx = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '10',
'11', '12', '13');
my @y = ('0', '1', '2', '3');
# From this I heed to create hash:
if ($line =~ /^.*-(\S+)\s+\S+\s+-f(\S+)\s+\S+.*$/) {
$1 will stand for @bcxx and $2 will stand for @bcy
Now I need to create hash tables from those values and compare them.
Finally I need to show values which do not fit. A clue is that @y
values should exist in each @xx, so there has to be 01 with values 0,
1, 2, 3.
I thought to do it like this:
$hash_xx_y{$xx}{$y} = 1
$hash_bcxx_bcy{$bcxx}{$y} = undef/1 - table for read values (may not
exist = undef; or they are ok = 1)
Then compare values from those two tables and print undefined values.
Can somebody give me a clue? Don't need whole code, just a clue how to
do it...
Thanks