On Sun, 15 Mar 2015 23:26:41 +1300
Kent Fredric <kentfred...@gmail.com> wrote:

> On 15 March 2015 at 21:41, Manfred Lotz <manfred.l...@arcor.de> wrote:
> 
> > I agree but I thought that in this case I would need to know the
> > potential warning messages the :encoding(UTF-8) could issue in
> > order to take action in those particular cases.
> >
> > Using a section local
> > {
> >    open( local *STDERR,'>', $err);
> > ...
> > }
> >
> > gives me more control.
> >
> >
> 
> Eh? I don't understand. Localising $SIG{__WARN__} here and then doing
> nothing doesn't require you to know the content of the warning to
> expect, it merely captures *all* warnings.
> 

Simple. I wasn't aware that I could localize $SIG{__WARN__} as well.


> ( You can do something or not with them, doesn't matter )
> 
> Surely, you've used it before successfully, so we are probably having
> some kind of communication error =).
> 
> 
> $ perl -E '$SIG{__WARN__} = sub { }; warn q[ this is the warning ]'
> $
> 
> You *can* add specific behaviour if you want to, but there's no
> requirement.
> 

Thanks for making me aware.


-- 
Manfred

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to