in reply to unless vs. bare block
choroba's answer should get you past your messages; this comment addresses your approach:
unless (open (QTREES, $file)) { print STDERR "WARNING: get_qtrees() can't open $file for filer $fi +ler!\n";
is unnecessarily verbose. In the first example, you could achieve the same end with:
unless (open (QTREES, $file) or warn "get_qtrees() can't open $file for filer $filer!\n");Similarly, in the second,
open (QTREES, $file) or warn "get_qtrees() can't open $file for filer $filer!\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: unless vs. bare block
by BrowserUk (Patriarch) on May 10, 2012 at 02:41 UTC | |
by Anonymous Monk on May 10, 2012 at 04:12 UTC | |
by BrowserUk (Patriarch) on May 10, 2012 at 05:44 UTC |
In Section
Seekers of Perl Wisdom