develooper Front page | perl.beginners | Postings from January 2002

Re: pulling file name into perl

Thread Previous
Deen Hameed
January 31, 2002 19:42
Re: pulling file name into perl
Message ID:

Hi Russell,

It executes a command and returns the EXIT STATUS of the command. 

If you look in $date, you will find the exit status of "ls ..." as
returned by the wait() call.


On Thu, 31 Jan 2002, Russell Boyd wrote:

> I am wanting to get a unix directory file listing and put it into a Perl array. I attempted
> $date = system "ls -al | grep filename.txt";
> However all this did was send it to <STDOUT>.
> What am I missing?
> Thanks,
> Russell

Deen Hameedd, Accidental Programmer

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About