I’m very new to Perl and currently I’m learning it on Windows 7 with ActiveState Perl. This is my program.
chomp(my @lines = <STDIN>);
foreach (sort @lines) {
print $_;
}
When running the program, I type some lines of strings then press Ctrl + c to tell the program that I’ve finished typing. However, after I get my result (generated from print $_;), I also got this message: Terminating on signal SIGINT(2). How to disable this message?
Thanks.
For Windows, to signify End of Line press
Ctrl + Zfollowed byEnterPressing
Ctrl + Csends the interrupt signal to your program which is the cause of theTerminating on SIGINTmessage you are seeing.