in reply to Processing (from a variable) the 'new' methods hash and storing it to a hash ref

No regex needed. Just an extra set of curly braces takes care of the whole thing. Putting Lique() in a package left AAEFTR.

#! perl -sw use strict; use Data::Dumper; my $debug = 1; sub Lique { my $inforef = shift; print Dumper( $inforef ) if $debug; # do stuff return $inforef; } my $fun = Lique( { # << Note! name => 'Test Addon', 'author'=> 'nutshell', email => 'x@x.com', descrip => 'That', version => '1.1', build => 2 } # << Note! ); my $q = Lique( { # << Note! name => 'Test', 'author'=> 'yeehaw', 'email' => 'yeehaw@yahoo.com', descrip => 'Fun', version => '1.11', build => 2 } # << Note! ); print Dumper( $fun, $q ); __DATA__ C:\test>202407 $VAR1 = { 'author' => 'nutshell', 'descrip' => 'That', 'build' => 2, 'version' => '1.1', 'email' => 'x@x.com', 'name' => 'Test Addon' }; $VAR1 = { 'author' => 'yeehaw', 'descrip' => 'Fun', 'build' => 2, 'version' => '1.11', 'email' => 'yeehaw@yahoo.com', 'name' => 'Test' }; $VAR1 = { 'author' => 'nutshell', 'descrip' => 'That', 'build' => 2, 'version' => '1.1', 'email' => 'x@x.com', 'name' => 'Test Addon' }; $VAR2 = { 'author' => 'yeehaw', 'descrip' => 'Fun', 'build' => 2, 'version' => '1.11', 'email' => 'yeehaw@yahoo.com', 'name' => 'Test' }; C:\test>

Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!
  • Comment on Re: Processing (from a variable) the 'new' methods hash and storing it to a hash ref
  • Download Code