use strict;
use warnings;
#this script we try the input for perl



#first use <STDIN>, it takes what you input and give it to the variable you define. note that there is a new-line symbol when you press enter and we will talk in next chapter
print "please put in the first name\n";
my $name=<STDIN>;
print "please put in the last name\n";
my $surname=<STDIN>;

print $name," ", $surname; 


#secondly, when you use "perl script.pl input1 input2....." on command line, all those input1, input2.. are taken to a special variable called @ARGV, you can take variables from it then
#try something after the "perl script.pl"
my @array=@ARGV; 
my $input=$ARGV[2]; 
print join (", ",@array), "\n"; 
print $input, "\n"; 


#now try "perl script.pl > output.txt" , (now you need to silence the <STDIN> line, or the script will wait for STDIN) and see output.txt in your folder--this is easiest way to save a file


