Howdy list!
I was wondering if it's possible to run a funtion and have it set a bunch of variables. As in variables I didn't declare before. #/usr/bin/perl -w use strict; makevars(); # declares, and gives a value to $one $two $three print "$one $two $three"; I could have it return a refrence to a hash and just use $v->{'one'} $v->{'two'} etc but It'd be nice to just have the vars ready to go after running makevars(); Is this possible? Something like: sub makevars { my $c; @vars = qw(one two three); for(@vars) { ${$_} = $c++; } return ???; } makevars() print "$one $two $three"; DOES: 123 Thanks Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]