Sep 18, 2002 #1 ianfo Programmer Joined Aug 20, 2002 Messages 29 Location GB Hi, Does anyone know if it's possible to do this in one line, as opposed to creating an array then creating a reference to that array? my @HOSTS=split /,/, aaa,bbb,ccc,ddd my $HOSTLIST=\@HOSTS; Thanks
Hi, Does anyone know if it's possible to do this in one line, as opposed to creating an array then creating a reference to that array? my @HOSTS=split /,/, aaa,bbb,ccc,ddd my $HOSTLIST=\@HOSTS; Thanks
Sep 18, 2002 #2 justice41 Programmer Joined May 29, 2002 Messages 755 Location US You can just make the assignment directly like Code: my @$HOSTLIST = split /,/, "aaa,bbb,ccc,ddd"; jaa Upvote 0 Downvote
You can just make the assignment directly like Code: my @$HOSTLIST = split /,/, "aaa,bbb,ccc,ddd"; jaa