dideod.yang has asked for the wisdom of the Perl Monks concerning the following question:
I don't know what is "$test -> {'RecordType'} = UNKNOWN;". At first I think that is hash. but it is not hash becuase "print Dumper(\%test)" didn't operate....
My first question is What is "$test -> {'RecordType'} = UNKNOWN;". is it hash? or just define variable?? My second question is about below script. I understand why print "case 1", but I don't understand abour case 2. I think case 2 can't operate becasue ifcondition is false.. can you explain about that??
My last question is What is different between $test -> {'RecordType'} = UNKNOWN; and $test -> {'RecordType'} = "UNKNOWN";. as generally I define some value with "" but that list didn't use "" so I wonder what is different between them.
please help me...
################## perl script ##################### $test -> {'RecordType'} = UNKNOWN; #case 1 if($test ->{'RecordType'}){ print "case1\n"; } #case 2 if($test ->{'RecordType'} = KNOWN){ print "case2\n"; } ###########################################
2018-06-27 Athanasius added paragraph tags and fixed code tags
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Is it hash??
by AnomalousMonk (Archbishop) on Jun 26, 2018 at 01:43 UTC | |
Re: Is it hash??
by Cristoforo (Curate) on Jun 26, 2018 at 02:02 UTC | |
Re: Is it hash??
by dideod.yang (Sexton) on Jun 26, 2018 at 07:44 UTC | |
by AnomalousMonk (Archbishop) on Jun 26, 2018 at 15:07 UTC | |
Re: Is it hash??
by Anonymous Monk on Jun 26, 2018 at 12:57 UTC |