[Chicago-talk] OPEN() conditional

Randal L. Schwartz merlyn at stonehenge.com
Tue Jul 5 15:42:14 PDT 2011

>>>>> "Steven" == Steven Lembark <lembark at wrkhors.com> writes:

Steven> my $fh  = '';

Did you want autovivification there?  If so, leave $fh as undef, not
empty string.

Steven> open $fh, '<', $path1
Steven> or 
Steven> open $fh, '<', $path2
Steven> or 
Steven> die "$path1, $path2";

If it accidentally works with empty string, I'd be surprised.

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion

More information about the Chicago-talk mailing list