in reply to Re: An open can of worms JAPH
in thread An open can of worms JAPH

As the original post stated, this is intended for Perl 5.8.0 or later.

Under Perl 5.8.0, it won't create a physical file, but instead, a proper in-memory file. That is why I recommended 5.8.0 or later. ...well, that and the fact that I assumed that passing a scalar ref as a filename to a pre-5.8.0 Perl wouldn't even run.

Out of curiosity, in your test on Perl 5.6.1, did it create a file named "SCALAR(0x1234567)" (or something like that) on your file system?

Update: I have now modified the original JAPH by adding "require 5.8.0" to the beginning of the script so that people who fail to read the caviat won't inadvertantly run it on pre-5.8.0 versions. You can still remove that 'require 5.8.0' part to test it on pre 5.8.0 versions if you want. It won't hurt anything. But it probably will create a zero-byte file named "SCALAR(0x.....)" that you'll have to erase later. Again, no biggie.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
Re: Re: Re: An open can of worms JAPH
by ambrus (Abbot) on Dec 03, 2003 at 13:23 UTC
    Out of curiosity, in your test on Perl 5.6.1, did it create a file named "SCALAR(0x1234567)" (or something like that) on your file system?

    I tested it with 5.6.1. It does create such a file, and it works.