1

I'm new in Eclipse version Helios. Perl script:

use strict;
warn "Not work\n";
print STDERR "Yes it work" 

In the console view, I can't see the warn output. How can I fix it?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Alex SH
  • 11
  • 1

3 Answers3

2

I assume it is not just warnings, but all output to STDERR.

In

Window->Preferences->Run/Debug->Console. 

Tick the option "Show when program writes to standard error"

Andro Selva
  • 53,910
  • 52
  • 193
  • 240
Owen
  • 36
  • 4
0

This works fine for me. Instead of using Eclipse, try just putting this into a text file, then running it from the command prompt (because I'm assuming Windows...?)

C:\>perl test.pl

Personally, I don't think Eclipse is very good for Perl (or scripting in general), I would just stick to a text editor.

VolatileRig
  • 2,727
  • 6
  • 32
  • 44
  • 1
    thank you, but i like IDE, when i work on me perl script. And yes in console all work correctly. – Alex SH May 02 '11 at 08:18
-1

I know this is an old thread but I just came across the answer and wanted to add it in case someone else is using this tool.

Running a Perl script in Eclipse with Epic seems to ignore the use Warnings; line in my files. To fix this you can edit the run configuration and add -w to the Perl arguments under the "arguments" tab in the run configuration manager. This will cause Perl to throw warnings and print them to the console. The only note is this will make all modules throw warnings even if they do not call out use warnings themselves.

deweytew
  • 49
  • 1
  • 3