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

[MacPerl] mac file names with < >'s in it...



Hello!

   I'm quite new to macperl, and I'm stumbling on a platform issue. I 
want to scan
a folder and open every file in it. I get the list OK, but some of the 
files in
the folder have names like:
<untitled>
> hello
< about this


and of course, macperl thinks it's perl syntax (ie that I mean to > to 
'hello', and not
open the file '> hello'................ :(
does anyone know how to quote the filename so that macperl doesn't 
interpret the > or < ?

here is the code snippet:
#!perl

chdir ":work:";

while ($filename = <*>) {
  unless(open(INPUTFILE,$filename)) { die "arrrgle unable to open 
$filename $!\n";};
  print "$filename\n";
  close(INPUTFILE);
}


thanks !