#!/usr/bin/perl -w

use warnings;
use strict;

my $filename = "stack-overflow.c";

open (FH,"$filename") or die("Can't open $filename");
my @array = <FH>;
close(FH);
my $i = 1;
printf ("Enter line to get and show from $filename:");
my $value = <STDIN>;
chomp($value);
foreach my $line (@array) {
$i++;
#print $line;
#print $i;
$array[$i+1]="$line";
if ($value==$i) {
print "The line $i You've choosed is: $line";
}

}
