0

I am coding a basic Search DNA sequence script in Perl using Netbeans IDE 7.4. The purpose of the script is to ask the user to type a string of DNA sequence, thereafter, the script asks the user to type a string of nucleotides. Finally, the script should print if the string of typed nucleotides was found or not. This is the following code of my script:

#!/usr/bin/perl
use warnings;
use strict;

sub main() {
    print "Please, enter your desired DNA sequence: ";
    my $dnaInput = <STDIN>;
    chomp($dnaInput);
    print $dnaInput;
}

main();

The problem comes when I am trying to ask to the user for its input DNA. Netbeans simply does not give me any chance to get the user's input value, that is, the "Please, enter your desired DNA sequence" line is printed but when I try to type the DNA, nothing happens, it's just unresponsive. I already found some similar questions such as:

  1. Find nucleotides in DNA sequence with perl
  2. How can I get user input without waiting for enter in Perl?
  3. How do I input an Enter using perl?
  4. how to get user input and use that value in the script for Perl

However, it seems that they used the terminal to get the user's input and I want to get my script running with netbeans. All suggestions and answers are welcome :)

Community
  • 1
  • 1
abautista
  • 2,410
  • 5
  • 41
  • 72

1 Answers1

0

Thanks to the suggestion proposed by @SudeepHazra, my program runs smoothly. I had to download Netbeans 8.01 and install the Perl plugin from the following website: http://plugins.netbeans.org/plugin/36183/perl-on-netbeans. Everything works great now with the plugin.

abautista
  • 2,410
  • 5
  • 41
  • 72