Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You could use Storable as a mechanism for serialising your hash into a scalar. I would recommend this approach as it's quite space-efficient. Much more so than, for example, Data::Dumper with $Data::Dumper::Indent = 0. On the other hand, if Storable is space-efficient, it is because the data structure is written in a binary format. That means that you can't easily inspect the values during a debugging run, whereas you could with Data::Dumper. Finally, Data::Dumper is dangerous for serialisation, because you recover it with an eval, which gives the bad guys a chance to Nasty Things™ to your system. print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u' In reply to Re: print hash into scalar
by grinder
|
|