#!/usr/bin/perl use warnings; use strict; our @data = qw(webpage1 webpage2); print "Webpage needed: "; # flushes output buffers chomp(my $response = ); # instead of <> in case they # add command line arguments push @data, $response unless grep { $_ eq $response } @data; print "$_\n" for @data;