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

Re: [MacPerl] problem with open()



An alternative would be to use the 'sysopen' function. I found this to 
work adequately in this situation.

-Paul Steinkamp
steinkam@apple.com

>From 'bibleBlack@starless.com.au' on '11/8/98 3:20 AM'

>Some apps create filenames with trailing spaces - I personally don't, but I
>haven't read anywhere that MacOS dissallows this. Anyway, the following
>snippet fails to work for any such filenames:
>
>--------------
>#!perl -w
>
>foreach $filename (@ARGV) {
>
>	chomp($filename); #problem exists whether chomp is used or not
>
>	open(FILE,"<$filename") || die "open($filename) failed";
> 	....
>--------------
>
>What does MP have against these filenames?
>--------------------------
>bibleBlack@starless.com.au
>
>***** Want to unsubscribe from this list?
>***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch
>

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch