I suggest reading through perlintro and References quick reference#!/usr/bin/perl --- use strict; use warnings; use Data::Dumper qw' Dumper '; Main( @ARGV ); exit( 0 ); sub Main { my $variable = 'String'; my %Hash = ( $variable => 'Hello' ); my $Ref = \%Hash; $Ref->{STRING} = 'STRING'; $Ref->{'s'.'t'.'r'.'i'.'NG'} = 'striNG'; $Hash { $Ref->{$variable} } = 'World!'; print Dumper( \%Hash ), "\n\n"; } __END__ $VAR1 = { 'String' => 'Hello', 'Hello' => 'World!', 'striNG' => 'striNG', 'STRING' => 'STRING' };
In reply to Re: How to send attributes of an object to create an object of another class?
by Anonymous Monk
in thread How to send attributes of an object to create an object of another class?
by Perllace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |