#!/usr/bin/perl -w
# The above line instructs the code where to look for the perl executable
#	This should always be the first line of your perl code

#Usage#1:
#	readDNA.pl {input DNA sequence}

#Usage#2:
#	readDNA.pl 


# Description:
#	reads a DNA sequence from standard input (or user entered)
# 		and then outputs the sequence back to the standard output

# the "use strict" command instructs the perl interpreter to make sure 
#	every variable name used in the program is defined by the user
#	It is a good programming practice.

use strict;

# Let us define our own variable called "sequence" and initialize it to an empty string
my $sequence = "";

# First check whether the user has passed a sequence as an argument to the program call
#	If so, assign it to the sequence variable
#	Otherwise, allow the user to input it in run-time

if(exists($ARGV[0])) {
	$sequence = $ARGV[0];
}
else {
	print "Input the sequence: ";
	$sequence = <stdin>;
}

# All strings that start with a "$" sign is a variable in Perl
# "$ARGV[0]" is a special variable that points to the first argument passed by the user at command
#	"$ARGV[1]" points to the second argument,
#	"$ARGV[2]" points to the third argument,
#	and so on..


print "The sequence is $sequence\n";

exit;




