in reply to New Line removal from both Unix & Win32
Please, never never use $^O eq $foo. Do a pattern match instead: $^O =~ /Win32/i. But judging from your error message I'm guessing that your Linux box is using an older version of Perl (5.005 or earlier) which doesn't autovivify filehandles so it's barfing at the open with a lexical variable. You have to write it as follows:
And please please use the three-argument from of open (as shown in my snippet).use Symbol (); my $fh = Symbol::gensym(); open $fh, "+<", $Conf[1] or warn "$!";
Makeshifts last the longest.
|
|---|