wfsp has asked for the wisdom of the Perl Monks concerning the following question:
I'm getting warnings:#!/bin/perl5 use strict; use warnings; open ERRORFILE, ">>myprogram.error" or die "Can't open myprogram.error"; open SAVEERR, ">&STDERR"; open STDERR, ">&ERRORFILE"; select STDERR; $| =1; print STDERR "stderr 1\n"; close STDERR; open STDERR, ">&SAVEERR"; print STDERR "stderr 2\n";
Do I need no warnings? If so, where? Apart from that it works as expected.Name "main::SAVEERR" used only once Name "main::ERRORFILE" used only once
Thanks in advance
wfsp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Warnings while redirecting STDERR
by dpuu (Chaplain) on Aug 27, 2004 at 18:21 UTC | |
by wfsp (Abbot) on Aug 27, 2004 at 18:28 UTC |