Randomseq code 1

From Biolecture.org

Because of my lack of coding ability, I couldn't solve the error

#!/usr/bin/perl

use 5.010;
use strict;
use warnings;
use Scalar::Util qw(looks_like_number);
print "Enter the number of sequence you want!\n";
my $seqnum=<STDIN>;
chomp $seqnum;
my @chars=("A","T","G","C");
my @newstring={};
$newstring .= $chars[rand @chars] for 1..$seqnum;
print(@newstring);