Harry Putnam <[EMAIL PROTECTED]> writes:
> Running the ls from inside perl program
>
> #!/usr/bin/perl -w
> ## Notice the pipe symbol
Some kind of conspiracy has removed the PIPE symbol I referenced
(probably a `senior moment')
> open(PROC,"ls ");
should have a pipe lik
Hi Mark.
Mark Vanmiddlesworth wrote:
> I want to feed the output of an "ls" command into a perl script and
> store it as a variable, but I can't seem to figure out how to do this.
> How can I get this working?
Unless you have a good reason to use 'ls', you may well be better
off doing it within P
Mark Vanmiddlesworth wrote:
>
> I want to feed the output of an "ls" command into a perl script and
> store it as a variable, but I can't seem to figure out how to do this.
> How can I get this working?
To store the results in a scalar:
my $results = `ls`;
To store the results in an array:
my
Mark VanMiddlesworth <[EMAIL PROTECTED]> writes:
> I want to feed the output of an "ls" command into a perl script and
> store it as a variable, but I can't seem to figure out how to do
> this. How can I get this working?
>
> thanks,
> mark
>
> p.s. I'm using tcsh on mac os 10.2
I now nothing abo