He got lots of blanks when it came to the -A. So I told him to turn on -w. He got lots of warnings. I tried the program on my machine, and it worked fine. I tried it on his machine, and it didn't work. So I tried explicitly using /bin/ls and it worked.ls | perl -nle 'print "$_: ", -A'
With a sour expression on my face, I typed alias ls, and what did I see? ls --color But his terminal wasn't set up to display color. That was a fun brain-wrecker: the ANSI codes were in the filenames, and thus, -A "\e[...foobar\e[..." returned undef.
_____________________________________________________
Jeff japhy Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why system calls suck.
by xphase_work (Pilgrim) on Jul 31, 2001 at 21:13 UTC | |
by no_slogan (Deacon) on Jul 31, 2001 at 23:04 UTC | |
|
Re: Why system calls suck.
by buckaduck (Chaplain) on Jul 31, 2001 at 23:55 UTC | |
|
Re: Why system calls suck.
by blakem (Monsignor) on Aug 01, 2001 at 22:39 UTC | |
|
Re: Why system calls suck.
by runrig (Abbot) on Aug 01, 2001 at 00:54 UTC | |
|
Re: Why system calls suck.
by Anonymous Monk on Aug 01, 2001 at 13:49 UTC |