in reply to Re: Read only Files in a Directory
in thread Read only Files in a Directory

characters meaningful to csh must be escaped

Not in my experience (on a Unix, though):

## create some files with funny names map { open my $fd, '>', chr $_ or die "open: $!"; close $fd; } 33..45,58..63,91..96,123..126 $ perl -le 'print glob q[+]' + $ perl -le 'print glob q[`]' ` $ perl -le 'print glob q[;]' ;

The only gotchas are * and ?:

$ perl -le 'print glob q[?]' !"#$%&'()*+,-:;<=>?[\]^_`{|}~ $ perl -le 'print glob q[\?]' ? $ perl -le 'print glob q[*]' !"#$%&'()*+,-:;<=>?[\]^_`{|}~ $ perl -le 'print glob q[\*]' *

--
David Serrano

Replies are listed 'Best First'.
Re^3: Read only Files in a Directory
by swampyankee (Parson) on Aug 02, 2006 at 14:24 UTC

    Not in my experience (on a Unix, though):

    It is my experience on Windows: it gets confused about blanks in directory names, possibly because it's implemented differently in the Windows port than in the various *ixen.

    I don't know whether using opendir and readdir is better than glob, but I usually find glob more convenient.

    emc

    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.

    Groucho Marx