I'm new to Perl and am trying to write a simple program that prompts the user to enter a number. I then want that number to be printed. I think I have the correct code, but when I run the program I'm not able to enter anything. I'm using Sublime Text 2. Am I missing a plugin or something? How do I get this to work? I've only done simple if/else statements prior to this and everything worked. I just can't seem to prompt the user for input.
Here is the code:
print ("Please enter a number: \n");
$seq = <STDIN>;
print("Sequence = $seq \n");
And here is the output:
Use of uninitialized value $seq in concatenation (.) or string at C:\blah\blah\practice.pl line 3.
Please enter a number:
Sequence =
[Finished in 0.4s]