home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!convex!darwin.sura.net!Sirius.dfn.de!fauern!Germany.EU.net!mcsun!sunic!dkuug!iesd!iesd.auc.dk!krab
- From: krab@iesd.auc.dk (Kresten Krab Thorup)
- Newsgroups: comp.lang.perl
- Subject: Filenames containing spaces
- Message-ID: <KRAB.92Sep13153712@xiv.iesd.auc.dk>
- Date: 13 Sep 92 14:37:12 GMT
- Sender: news@iesd.auc.dk (UseNet News)
- Distribution: comp
- Organization: Mathematics and Computer Science, Aalborg University
- Lines: 16
-
- I have found some problems using filenames with spaces in either end
- of the name, It can, however be solved, by inserting `./' in the
- beginning, and `\0' int the end. Like this
-
- $filename = ' strange file name ';
- open(FILE, "./$filename\0");
-
- If you dont do it like this, Perl will remove the spaces in both ends,
- and try to open the file:
-
- 'strange file name'
-
- I don't know if Perl is supposed to work like this (of cause, it was
- programmed to it) but is this the intention - Larry?
-
- /Kresten
-