[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] open() misfeature?



Hi!

First of all: forget about the script I've recently put on this list. It's
full of horrible bugs and won't work (by the way, it's now called
'httpjob.pl' ;-) I've already fixed them by myself.

1.) When working with droplets who get a filename via @ARGV, a strange
error occured. Here's a sample:

#!perl
my $file = shift;
open( IN, $file) || die "Can't open '$file': $!\n";
        while( <IN> ) { print }
close IN;

resulted:

# Can't open ' Mac:Desktop Folder:index.html': Invalid argument
              ^
              |
               - that's the problem!

It turned out that my harddisk's name was starting with a space. After
calling it 'Mac', it worked well :)

2.) Another "misfeature": When i'm editing a script in MacPerlApp 5.1.3r2
and restart my Mac without exiting the application (reset via
ctrl-apple-'turn on button'), the script vanishes magically from my
harddisk and never appears again... :-( This is not a big problem as long
as you know it...

Greetings,
           Erich.

--------------------------------------------
        h0444zkf@rz.hu-berlin.de
  http://www2.rz.hu-berlin.de/~h0444zkf
--------------------------------------------