in reply to Re: simple to describe I/O problem
in thread simple to describe I/O problem

if ($fh->open("$file","<")) { ... }

Why does the string  $file have to be interpolated into another string  "$file" before being passed to the open method?

Replies are listed 'Best First'.
Re^3: simple to describe I/O problem
by Anonymous Monk on Sep 01, 2014 at 20:04 UTC
    It doesn't, "$file" was just a remnant of (too) quickly editing the OP's code. (Unless maybe $file is an object with overloaded stringification; but then it'd probably be stringified inside open...)