[Xml-compile] repeat tags with XML::Schema

Mark Overmeer mark at overmeer.net
Tue Jun 25 11:19:15 GMT 2013


* Hugues Max (huguesmax at gmail.com) [130625 11:07]:
> in    push @pmtids, + {PmtId => {
> what mean this +

There are many meanings for {}, for instance a code block.  In this
base we want the ref-hash meaning.  Perl is capable of correctly detect
which meaning the {} have... however, it is not always clear for the
reader of the program.  So, for clarity sake only, I often write +{}
-hash to be explicit that I create a ref-hash.

> normal push is
> push(@pmtids, $value);
> 
> and what is the sens of \@ instead of @ in  ( this is a ref to.. ?)
> 
> $s->{CstmrDrctDbtInitn}{PmtInf}{DrctDbtTxInf} = \@pmtids;


   my @a = (3, 4);
   my ($x, $y) = @a;   -> $x==3, $y==$4

   my ($v, $w) = \@a;  -> $v==[3,4], $w==undef

  @x is an array: storage for a list of values (not a ref)
 \@x is a reference to an array; where to find an array
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list